ref: Introduce linter for proper naming conventions#636
Conversation
|
|
||
| def with_metaclass(meta, *bases): | ||
| # type: (Any, *Any) -> Any | ||
| class metaclass(type): |
There was a problem hiding this comment.
I might not be remembering well, but I thought class metaclass was common practice?
There was a problem hiding this comment.
I honestly don't know. Are you saying that metaclasses are supposed to be snakecase?
|
|
||
| class SparkListener(object): | ||
| def onApplicationEnd(self, applicationEnd): | ||
| def onApplicationEnd(self, applicationEnd): # noqa: N802,N803 |
There was a problem hiding this comment.
Maybe apply this to the whole class or module/file?
Doing it per method is very noisy :(
Also could we have a note like "# noqa: ...; ignore camelCase in methods names and attributes because this code is inherited from somewhere..."
There was a problem hiding this comment.
I am not sure how to specify it on a class level. I would like to avoid doing it on a module level for sure asssuming we do not restructure the modules.
.flake8
Outdated
| B014 // does not apply to Python 2 | ||
| B014, // does not apply to Python 2 | ||
| N812, // i don't care | ||
| N804 // conflicts with B902 |
There was a problem hiding this comment.
Could we add a link to https://pypi.org/project/pep8-naming/?
Would be easier to figure out what the codes mean. A quick note on their meaning wouldn't hurt either?!
There was a problem hiding this comment.
Yeah I will look into how to document this better.
There was a problem hiding this comment.
I updated all the docs but couldn't figure out how to truly reference lints by name
No description provided.