Closed makpia closed 5 months ago
Thanks for raising this - have reproduced it
Hello, @makpia!
I believe this has been fixed with recent changes in how we analyze nested functions. Can you please upgrade Sourcery to the latest version (v1.15.0) and test this again?
Closing this issue since this issue was fixed in the latest Sourcery releases - please reopen it in case it happens again for you :smile:
Checklist
Description
if
then all functions defined inside the method will be treated as instance method by mistake, so sourcery will check if the first parameter name is 'self'
in the following code example, sourcery reports 'instance-method-first-arg-name' error on function 'inner_func'
Code snippet that reproduces issue
Debug Information
IDE Version:
vs code 1.80.0
Sourcery Version:
1.6.0
Operating system and Version:
windows 11