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

N815 is not being reported #187

Closed
cyberfox1 opened this issue Nov 30, 2021 · 4 comments
Closed

N815 is not being reported #187

cyberfox1 opened this issue Nov 30, 2021 · 4 comments

Comments

@cyberfox1
Copy link

cyberfox1 commented Nov 30, 2021

I don't really understand, previous bug reports indicated it would as there is an exception list for things like unittest.

#93
1679354

@sigmavirus24
Copy link
Member

I don't really understand, you want unittest mixed case method overrides to be reported as N815? You've provided no sample code, no expectations, and you haven't explained what you're seeing. This issue is not actionable.

@cyberfox1
Copy link
Author

cyberfox1 commented Dec 1, 2021

you want unittest mixed case method overrides to be reported as N815

No, I want N815 to be reported where applicable.

You've provided no sample code

Well hows this:

class AClass():
    
    def __init__(self):
        self.fooBar = 42

no expectations

I want N815 to be reported where applicable.

and you haven't explained what you're seeing

N815 is not being reported.

I have a version that should according to other links.
Installed plugins: hacking.core: 0.0.1, mccabe: 0.6.1, naming: 0.10.0, pycodestyle: 2.6.0, pyflakes: 2.2.0

@sigmavirus24
Copy link
Member

class AClass:
    mixedConst = 0

    def __init__(self):
        self.fooBar = 42

    def mixedMethod(self):
        self.fooBar = 24

fooBar = 42

def funFunc():
    return 42
(pep8) ⬢[sigmavirus24@toolbox ~]$ flake8 t.py
t.py:2:6: N815 variable 'mixedConst' in class scope should not be mixedCase
t.py:7:10: N802 function name 'mixedMethod' should be lowercase
t.py:10:1: E305 expected 2 blank lines after class or function definition, found 1
t.py:10:2: N816 variable 'fooBar' in global scope should not be mixedCase
t.py:12:1: E302 expected 2 blank lines, found 1
t.py:12:6: N802 function name 'funFunc' should be lowercase
Installed plugins: mccabe: 0.6.1, naming: 0.12.1, pycodestyle: 2.8.0, pyflakes: 2.4.0

The documentation for N815 is that it's variables in the class scope, not instance scope. Thus it's working as expected

@cyberfox1
Copy link
Author

So what is the code for instance scope?

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

No branches or pull requests

2 participants