Tools

NameRole
PEP8the official style guide
Pycodestyle (Formerly PEP8)official linter tool to check the python code against the style conventions of PEP8 python
pylintpython linter which checks the source code and also acts as a bug and quality checker. It has more verification checks and options than just PEP8(Python style guide)
pyflakesverification tool(linter) which checks for Python files for errors
flake8wrapper around pyflakes, pycodestyle and McCabe script
hackinghacking is a set of flake8 plugins that test and enforce the OpenStack StyleGuide
blackThe uncompromising python code auto-formatter. Black reformats entire files in place and also formats the strings to have double-qoutes.
flake8-docstringssimple module that adds an extension for the fantastic pydocstyle tool to flake8
autopep8autopep8 automatically formats Python code to the PEP8 style. It fixes most of the formatting issues that are reported by pycodestyle.
yapfanother auto-formatter which is maintained by google
isortisort is a Python utility / library to sort imports alphabetically, and automatically separated into sections and by type
PyCheckera tool for finding bugs in python source code (old tool)
pydocstylea static analysis tool for checking compliance with Python docstring conventions.
mypyan official optional static type checker for Python that aims to combine the benefits of dynamic (or "duck") typing and static typing
Pyrightan open-source Python type checker and language server and much farster than mypy by MS
Pylancea tool wihch leverages Pyright’s functionality with additional features, some of which are not open-sourced

Conclusion

  • Editor:
    • VSCode
  • Settings:
    • See Setting.json
    • https://github.com/psf/black/blob/master/docs/compatible_configs.md
  • Linter:
    • flake8
  • Sorter:
    • isort
  • Formatter
    • autopep8 or black
  • Type Checker:
    • mypy or Pyright

REFERENCES:

  • https://www.kimoton.com/entry/20181223/1545540702
  • https://dev.classmethod.jp/articles/flake8-plugins-and-format-tools/
  • https://books.agiliq.com/projects/essential-python-tools/en/latest/linters.html
  • https://project.nikkeibp.co.jp/idg/atcl/idg/14/481709/032700526/
  • https://github.com/microsoft/pyright
  • http://mypy-lang.org/
  • https://minus9d.hatenablog.com/entry/2018/10/22/235604
  • https://qiita.com/irukiti/items/5d523c338f4affc9f722