-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: str(ENUM)
should just stringify the slug
#999
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Reviewed everything up to 477cd81 in 10 seconds
More details
- Looked at
27
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. python/tests/test_client/test_enum.py:120
- Draft comment:
Consider adding similar__str__
method test cases for other enum types likeAction
,Trigger
, andTag
to ensure consistency and correctness across all enum types. - Reason this comment was not posted:
Confidence changes required:50%
The__str__
method implementation in theEnum
class is correct and aligns with the test case added intest_app_enum
. However, the test case for__str__
is only added forApp.GITHUB
. It would be beneficial to add similar test cases for other enum types to ensure consistency and correctness across the board.
Workflow ID: wflow_HkMpmIGZ14IqFqZ0
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Code Review SummaryThe changes look good overall. The PR adds a proper string representation to the Enum class which is a useful addition. The implementation is simple, correct, and consistent with Python's string representation conventions. Strengths:
Suggestions for improvement:
The code quality is good, and with the suggested improvements, it would be even better. The changes are ready to be merged after addressing the minor suggestions. |
str(ENUM)
should just stringify the slug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on f6f9152 in 5 minutes and 29 seconds
More details
- Looked at
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. python/tests/test_tools/test_toolset.py:123
- Draft comment:
The change fromApp.GITHUB
toGITHUB
in the test is correct and aligns with the new__str__
method implementation for theEnum
class, which returns the slug. - Reason this comment was not posted:
Confidence changes required:0%
The change in the test is consistent with the PR description, which aims to change the string representation of the enum to its slug. The test now correctly expects 'GITHUB' instead of 'App.GITHUB'.
Workflow ID: wflow_Mkkv3ntA7FidK4Te
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Important
Add
__str__
method toEnum
class to returnslug
, with corresponding test updates.__str__
method toEnum
class inenum.py
to returnself.slug
.test_enum.py
to assertstr(App.GITHUB) == "GITHUB"
.test_toolset.py
to expect('GITHUB', ...)
instead of('App.GITHUB', ...)
.This description was created by for f6f9152. It will automatically update as commits are pushed.