Enum comparison
#11617
Replies: 1 comment
-
I don't think so. Ruff would need to support better type-inference to distinguish between Enums and other objects (#3893). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
According to the python documentation enums are compared by identity, ie.
MyEnum.A is MyEnum.A
. However, i was unable to find any tools or rules related to enum-comparison in ruff.I was wondering if any existing tools/rules implement this check, or if it exists as an not yet implemented part of some tools?
Beta Was this translation helpful? Give feedback.
All reactions