Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

devcydo
Copy link

@devcydo devcydo commented Jul 11, 2022

Hi!

Fix issue #382

After a lot of research I found out that the only way (I'm 99% sure about this) of knowing if a function belongs to a class is using __qualname__. The only issue I see with this solution is that __qualname__ belongs to python 3.3 and newer versions.

Another solution that I can think of is to check and to remove the 'self' argument from every function, regardless of whether it belongs to a class or not. This solution will limit the user to not name the argument from a function, that doesn't belong to a class, 'self'.

Let me know what you think and I'll be happy to make the changes, as well as to make any correction :)

@google-cla
Copy link

google-cla bot commented Jul 11, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant