-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Implement flake8-walrus #3464
Comments
Personally, I would like to work on implementing this plugin, but is this an appropriate rule to incorporate into I know there were objections to the introduction of this operator, but I feel this rule is a matter of user preference. |
What's the rational of forbidding the operator (other than |
The objection is readability. It may not be the only one, but it is mine. And I do not want others to be able to use it in code I maintain, so I forbid its usage via the flake8 plugin by running flake8 in CI. It is totally subjective preference but so is any style rule somehow, is it not? |
Yeah, I think this is a hard one for us to merge until we have a clearer policy on opinionated rules / plugins (similar to #3463). |
Thanks for explaining your motivation. We're considering reorganizing the ruff rules and one category that we intend to introduce is |
The Sure, when e.g. I am the only one using it, I would have to wait for plugin support and write my own plugin for this. This makes sense to me. |
#13741 is related where the author asked for restricting most, but not all walrus operators. |
flake8-walrus
Forbids usage of the
:=
walrus operator.Error Codes
ASN001
do not use assignment expressionsThe text was updated successfully, but these errors were encountered: