Open ThomasG77 opened 2 years ago
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)
wget https://google.github.io/styleguide/pylintrc;pylint udata
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 https://github.com/microsoft/presidio/issues/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.
Agreed with the need for better code consistency. @quaxsze, is there any history on using a pre-commit hook for linting?
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
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 https://github.com/microsoft/presidio/issues/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.