Closed willjhenry closed 1 year ago
Thanks for reporting this @willjhenry.
This is a difficult one to fix for us and will take a while. In the meantime you can disable this suggestion
This has been addressed in our next release - to avoid these false positives this rule will not trigger where there is any decorator on a method.
The fix for this bug is now released in Sourcery v1.0.2. Thank you again for reporting this issue!
Description
I am getting the sourcery suggestion "The first argument to instance method should be
self
" when I should not be. I am getting these on hybrid property definitions, which is a feature/decorator from sqlalchemy. The method under the@all_roles.expression
is correctly a class method and the first argument should becls
Code snippet that reproduces issue
Debug Information
IDE Version: VS Code Version: 1.73.1
Sourcery Version: =Sourcery 0.13.0
Operating system and Version: macOS 12.6