Skip to content
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

Introduce pylint or black in pre-commit hook combined with pyflake8? #2714

Open
ThomasG77 opened this issue Mar 12, 2022 · 1 comment
Open

Comments

@ThomasG77
Copy link
Contributor

ThomasG77 commented Mar 12, 2022

On contributing guide e.g https://github.com/opendatateam/udata/blob/master/CONTRIBUTING.md#python-style-guide, there is a mention about using Python style guide. When you follow the link, you find in the section of the Google Python style guide https://google.github.io/styleguide/pyguide.html#2-python-language-rules, there is a mention to Pylint

Run pylint over your code using this pylintrc.

When I run it e.g wget https://google.github.io/styleguide/pylintrc;pylint udata, I see there are numerous issues (24680)

Pylint could be combined with flake8

Alternative could be about using black + flake8 http://www.locallyoptimal.com/blog/2019/08/23/why-you-should-use-black-for-your-python-style-linting/

Reasoning borrowed from microsoft/presidio#317 and http://www.locallyoptimal.com/blog/2019/08/23/why-you-should-use-black-for-your-python-style-linting/

I do not have a personal preference as long as a Python coding style can be enforced for consistency.

@maudetes
Copy link
Contributor

maudetes commented Mar 14, 2022

Agreed with the need for better code consistency. @quaxsze, is there any history on using a pre-commit hook for linting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants