Repository navigation
Conversation
A better implementation would use Sequence and not list (more generic)
ghost
left a comment
There was a problem hiding this comment.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
|
|
||
| class Comparable(Protocol): | ||
| @abstractmethod | ||
| def __lt__(self: ComparableType, other: ComparableType) -> bool: |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file searches/comparable_type.py, please provide doctest for the function __lt__
| pass | ||
|
|
||
| @abstractmethod | ||
| def __le__(self: ComparableType, other: ComparableType) -> bool: |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file searches/comparable_type.py, please provide doctest for the function __le__
| pass | ||
|
|
||
| @abstractmethod | ||
| def __gt__(self: ComparableType, other: ComparableType) -> bool: |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file searches/comparable_type.py, please provide doctest for the function __gt__
| pass | ||
|
|
||
| @abstractmethod | ||
| def __ge__(self: ComparableType, other: ComparableType) -> bool: |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file searches/comparable_type.py, please provide doctest for the function __ge__
| pass | ||
|
|
||
| @abstractmethod | ||
| def __eq__(self: ComparableType, other: object) -> bool: |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file searches/comparable_type.py, please provide doctest for the function __eq__
|
Should i ignore the dunder comments? |
ghost
left a comment
There was a problem hiding this comment.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
|
|
||
| class Comparable(Protocol): | ||
| @abstractmethod | ||
| def __lt__(self: ComparableType, other: ComparableType) -> bool: |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file searches/comparable_type.py, please provide doctest for the function __lt__
| pass | ||
|
|
||
| @abstractmethod | ||
| def __le__(self: ComparableType, other: ComparableType) -> bool: |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file searches/comparable_type.py, please provide doctest for the function __le__
| pass | ||
|
|
||
| @abstractmethod | ||
| def __gt__(self: ComparableType, other: ComparableType) -> bool: |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file searches/comparable_type.py, please provide doctest for the function __gt__
| pass | ||
|
|
||
| @abstractmethod | ||
| def __ge__(self: ComparableType, other: ComparableType) -> bool: |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file searches/comparable_type.py, please provide doctest for the function __ge__
| pass | ||
|
|
||
| @abstractmethod | ||
| def __eq__(self: ComparableType, other: object) -> bool: |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file searches/comparable_type.py, please provide doctest for the function __eq__
ghost
left a comment
There was a problem hiding this comment.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
|
|
||
| class Comparable(Protocol): | ||
| @abstractmethod | ||
| def __lt__(self: ComparableType, other: ComparableType) -> bool: |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file searches/comparable_type.py, please provide doctest for the function __lt__
| pass | ||
|
|
||
| @abstractmethod | ||
| def __le__(self: ComparableType, other: ComparableType) -> bool: |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file searches/comparable_type.py, please provide doctest for the function __le__
| pass | ||
|
|
||
| @abstractmethod | ||
| def __gt__(self: ComparableType, other: ComparableType) -> bool: |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file searches/comparable_type.py, please provide doctest for the function __gt__
| pass | ||
|
|
||
| @abstractmethod | ||
| def __ge__(self: ComparableType, other: ComparableType) -> bool: |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file searches/comparable_type.py, please provide doctest for the function __ge__
| pass | ||
|
|
||
| @abstractmethod | ||
| def __eq__(self: ComparableType, other: object) -> bool: |
There was a problem hiding this comment.
As there is no test file in this pull request nor any test function or class in the file searches/comparable_type.py, please provide doctest for the function __eq__
|
Hi, this is awesome, I have a few things on my plate, so will take a look at it soon. Also, ignore the bot comments, I will fix that as well. If you want to, you can fix it as well or open an issue with what should be done :) |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
Please reopen this pull request once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to seek help from our Gitter or ping one of the reviewers. Thank you for your contributions! |
A better implementation would use Sequence and not list (more generic)
Describe your change:
make searches generic and fix typing
i did not touch tabu_search.py
Sorry for the large PR but i felt it was necessary to show the use of Comparable
My other PR [mypy] Search is now fully typed with Generic types #4351 was closed because i accidently did not create it in draft mode and i could not seem to reopen..
Add an algorithm?
Fix a bug or typo in an existing algorithm?
Documentation change?
Checklist:
Fixes: #{$ISSUE_NO}.