Comments (4)
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.
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.
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.
So what is the code for instance scope?
from pep8-naming.
Related Issues (20)
- TypedDict classes should be exempt from N815 HOT 10
- Renaming default branch to main HOT 1
- Drop dependency on flake8-polyfill HOT 2
- N815 is not being reported HOT 1
- N816 does not make sense HOT 1
- False positive for N805 in a child class HOT 3
- False positive for HTTP request handler do_METHOD methods HOT 1
- False Error N805 HOT 1
- "camelcase imported as lowercase" failure in an import of a package or module HOT 12
- Add flake8_polyfill as requirement HOT 2
- Deprecation warning for options HOT 1
- Detect @classproperty mtehods as class methods HOT 3
- Feature request: ignore `N802` for methods marked with `@override` HOT 1
- Add naming rule for instance variables HOT 2
- ignore-names globbing is not case-sensitive on Windows HOT 1
- Add option to ignore N812 for specific packages
- New release? HOT 1
- `N803`, `N804` and `N805` should also ignore methods marked with `@override` HOT 1
- Package available but broken for python 3.7 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pep8-naming.