Skip to content
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

Functions starting/ending with a dunder #9

Closed
dstufft opened this issue Feb 25, 2014 · 2 comments
Closed

Functions starting/ending with a dunder #9

dstufft opened this issue Feb 25, 2014 · 2 comments

Comments

@dstufft
Copy link

dstufft commented Feb 25, 2014

pep8-naming does not allow functions starting or ending with a dunder (__). This is not something that is disallowed by PEP8 and I think this rule should be removed. However if this check remains then it should be moved to it's own check and should not be part of the more general "functions should be lowercase" check so that people can disable it in their own projects without disabling the useful lowercase function check.

@treyhunner
Copy link

👍 I also think dunder methods shouldn't be banned by default and even if they are the check should be coded separately from the lowercase name check.

@FichteFoll
Copy link

FichteFoll commented Jul 26, 2016

Dunder functions really shouldn't be marked in this check.
I do believe a separate check for this is useful because, by themselves, dunder functions have absolutely no different meaning from functions with a single underscore and thus are redundand.

Since PEP-8 doesn't have a stance regarding those, the check should probably be disabled by default?

jparise added a commit to jparise/pep8-naming that referenced this issue Jan 8, 2018
This check appears controversial (PyCQA#9) because PEP8 doesn't mention this
as an official naming rule. This change moves it to its own error code
so that it can be disabled separately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants