-
Notifications
You must be signed in to change notification settings - Fork 3
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
Enforce python naming convention #66
Comments
So the actual standard for Python is to use snake_case for functions and variables (as noted in PEP8) and somewhat enforced by the flake8 extension you linked. The fact that we (implicitly) used camelCase always bothered me but it's probably too difficult to change at this point, though automatic tools such as this one that leverages rope exists. Perhaps worth a discussion. |
Yeah you are right, we are not really following PEP8 that well. They do however state in the link you posted that
The tool does seem to support mixedCase and can maybe be of use just to get something going that is automated. I have however not tested the tool myself, but my main motivation was just to get some discussion started and seek out tools. |
Yeah, I also think renaming all the variables will be fairly disruptive. However, I have not seen any linters which support non-PEP8 naming standards. For example, the one you linked (pep8-naming) will throw a ton of |
Description of feature
Our python code is mostly
CamelCase
, but there are exceptions. To keep the python MDO Lab codebase and APIs consistent and predicable, we could and probably should integrate some tools into our testing to enforce this.Potential solution
There are several tools available, but one option that fits into our current tools is to use the
flake8
extension, pep8-naming.Feel free to suggest other tools or approaches.
The text was updated successfully, but these errors were encountered: