-
-
Notifications
You must be signed in to change notification settings - Fork 378
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
Forbid chaining is
#2443
Comments
Also, I think the same applies to |
Yes, totally. |
Hi, I'm new to contributing and would like to work on this issue. |
If there is no progress on this issue, then I would like to implement it. |
Hi, @lensvol! Happy to see you :) |
@sobolevn You know me, can't stay away from a free T-shirt :) |
Resolves wemake-services#2443.
Implemented in #2527, please review. |
If it is not resolved. I would like to work on this issue |
@adlizone feel free :) |
I think it is resolved in #2527, we just forgot to actualize the issue. |
Rule request
Thesis
Forbid
ast.Is
inast.Compare.ops
when it's size is not zero. For example:Reasoning
From the AST perspective,
is
is an operator and can be chained. That can lead to unexpected results when the author wanted to compare the result ofa is b
operation. Instead, Python will chain the operations and compare the last argument of the previous operation.The text was updated successfully, but these errors were encountered: