-
Notifications
You must be signed in to change notification settings - Fork 549
ref: Introduce linter for proper naming conventions #636
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
Conversation
@@ -59,12 +59,12 @@ def reraise(tp, value, tb=None): | |||
|
|||
def with_metaclass(meta, *bases): | |||
# type: (Any, *Any) -> Any | |||
class metaclass(type): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might not be remembering well, but I thought class metaclass
was common practice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I honestly don't know. Are you saying that metaclasses are supposed to be snakecase?
@@ -106,99 +106,101 @@ def process_event(event, hint): | |||
|
|||
|
|||
class SparkListener(object): | |||
def onApplicationEnd(self, applicationEnd): | |||
def onApplicationEnd(self, applicationEnd): # noqa: N802,N803 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I will look into how to document this better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated all the docs but couldn't figure out how to truly reference lints by name
No description provided.