GithubHelp home page GithubHelp logo

Comments (4)

sigmavirus24 avatar sigmavirus24 commented on June 12, 2024

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.

from pep8-naming.

cyberfox1 avatar cyberfox1 commented on June 12, 2024

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

from pep8-naming.

sigmavirus24 avatar sigmavirus24 commented on June 12, 2024
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

from pep8-naming.

cyberfox1 avatar cyberfox1 commented on June 12, 2024

So what is the code for instance scope?

from pep8-naming.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.