Open sobolevn opened 3 years ago
Hi! I'd like to work on this.
Awesome! Thanks a lot!
Hey @sobolevn! This is my first time contributing and am not sure where I should start with this problem. Would you be able to point me in the right direction?
@willtkwon Please feel free! And thank you 🙂
Is it correct that this check should find situations like this?
create_object.attr = lambda: print('Lambda!')
I mean that it should not distinguish lambda assignemnts inside init or anywehere.
We only treat self
, cls
, and mcs
as self-like objects. So, we only check them. See https://github.com/wemake-services/wemake-python-styleguide/blob/master/wemake_python_styleguide/constants.py#L150
Rule request
Thesis
We should forbid code like:
Reasoning
This will be very tricky to understand for users:
example.callback(1)
will look like a method, but it is not a method.