Currently, we have a large number of flake8 checks:
- flake8 (pep8)
- pydocstyle https://pypi.python.org/pypi/pydocstyle
- OpenStack style guidelines (https://docs.openstack.org/developer/hacking/)
- flake8-coding<1.3.0 https://pypi.python.org/pypi/flake8-coding
- flake8-comprehensions https://pypi.python.org/pypi/flake8-comprehensions
- flake8-future-import https://pypi.python.org/pypi/flake8-future-import
- flake8-string-format https://pypi.python.org/pypi/flake8-string-format
flake8-import-order https://pypi.python.org/pypi/flake8-import-order- flake8-tuple https://github.com/ar4s/flake8_tuple
- flake8-print https://pypi.python.org/pypi/flake8-print/2.0.2
- flake8-mock https://pypi.python.org/pypi/flake8-mock/0.1
- pep8-naming https://pypi.python.org/pypi/pep8-naming
Some of these are useful, because they catch bugs before they happen:
- flake8-coding<1.3.0 https://pypi.python.org/pypi/flake8-coding
- flake8-future-import https://pypi.python.org/pypi/flake8-future-import
- flake8-string-format https://pypi.python.org/pypi/flake8-string-format
- flake8-tuple https://github.com/ar4s/flake8_tuple
- flake8-print https://pypi.python.org/pypi/flake8-print/2.0.2
- flake8-mock https://pypi.python.org/pypi/flake8-mock/0.1
Some others purely force stylistic choices on the developer:
- flake8 (pep8)
- pydocstyle https://pypi.python.org/pypi/pydocstyle
- OpenStack style guidelines (https://docs.openstack.org/developer/hacking/)
- flake8-comprehensions https://pypi.python.org/pypi/flake8-comprehensions
flake8-import-order https://pypi.python.org/pypi/flake8-import-order- pep8-naming https://pypi.python.org/pypi/pep8-naming
For those stylistic choices, we should reconsider which ones we feel are really worth the time wasted in getting them right. A good stylistic rule has a few properties:
- has a strongly positive effect on readability
- is easy to get right
- are easy to fix when they are not right
- provides clear error messages when this is not the case (preferrably they say what you need to do instead of just telling you something is wrong)
From this list, I would say:
- pep8: probably OK
- pydocstyle: OK for requiring documentation, dubious when it gets to requiring a certain phrasing style
- openstack: might be OK
- flake8-comprehensions: OK-ish, but error messages are so-so
flake8-import-order: no, no, no and no- pep8-naming: OK
So I would suggest to:
- turn off flake8-import-order
- turn off parts of pydocstyle
and maybe turn off more later, depending on what are pain points for developers.