wemake-python-styleguide
wemake-python-styleguide copied to clipboard
Forbid to use `some .method()`
Rule request
Thesis
Python shocks me everyday. I found out (the hard way) that one can write some .method() and even some . method()
Here's what WPS says:
» flake8 ex.py
ex.py
1:1 C101 Coding magic comment not found
some .set(1, 2)
^
1:1 F821 undefined name 'some'
some .set(1, 2)
^
This is insane!
Original issue: https://github.com/django/django/pull/12426
This might be a consistency rule. I guess that we should use tokenize or libcst for this.
I'll add this rule
Awesome! Thanks a lot.