-
-
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 assigning lambda
to object properties
#1733
Comments
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 |
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.The text was updated successfully, but these errors were encountered: