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
False positive for WPS125 and attributes #1327
Comments
Also:
|
Example provided by @Dreamsorcerer is really common especially when working with ORMs, it's quite common to name fields/descriptors |
Even following one: def foo(bar):
bar.id = 12345 |
This is the rule that is hard to have done well, IMHO.
Python 🤷 |
I think 3 is an edge case that's better handled by type checking (e.g. Mypy), rather than worrying about it in wemake. |
Alternatively, a single |
OK, thinking about it, I think the latter is the better answer, have opened a PR to add this information to the docs. |
Ok, we have lots of bugs with attributes here. First of all, I want to change how some rules are applied for not I also want to ignore So, I will refector a lot of stuff to get this correct. Future reviews are welcome! |
So, basically we would have two sets of rules for attributes:
|
I am not going to create a new issue for it, because I am working on it right now anyways, but this is also a bug: class Some(object):
UPPER, lower = 1, 2 It does not raise any violations, but it should raise:
|
Bug report
What's wrong
It is not technically builtin shadowing.
The text was updated successfully, but these errors were encountered: