You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm okay with the current behaviour. To me "simple comparison" is clear enough and I can't see a good reason for selectively disabling only one of the two error codes.
I can't see a good reason for selectively disabling only one of the two error codes.
Yes, you're right -- it probably doesn't deserve its own error code. In which case, maybe we could make the error message for that code more customisable?
It just seems a bit silly to me that there's a comment in the source code that gives more information about why the error's being emitted than the error message that's given.
We currently have a very specific test for chained comparisons on lines 506-508:
flake8-pyi/pyi.py
Lines 506 to 508 in 34c17bd
However, we then give a generic error message:
"Y002 If test must be a simple comparison against sys.platform or sys.version_info"
If we split this off into its own error code, we could give a much more specific error message:
YXXX Chained comparisons are not supported by type-checkers
Thoughts?
The text was updated successfully, but these errors were encountered: