Needed and up-to-date tools to develop in Python (WORK IN PROGRESS)
The full documentation can be read at https://python-dev-tools.readthedocs.io.
In a terminal, run:
$ python3 -m pip install python-dev-tools --user --upgradeFull documentation on installation: https://python-dev-tools.readthedocs.io/en/latest/installation.html
That's it! Use the provided linter (flake8), formatter (whataformatter) and
precommit hook (TODO) where applicable.
- Follow the installation procedure for python-dev-tools
- Be sure to have the official Python extension installed in VS Code
- Open VS Code from within your activated virtual environment (in fact, make sure that
flake8from python-dev-tools is in yourPYTHON_PATH) - In VS Code, open settings (F1 key, then type "Open Settings (JSON)", then enter)
- Add in the opened JSON file (before the closing
}):
"python.linting.enabled": true,
"python.linting.flake8Enabled": true,
"python.linting.flake8Path": "flake8",
"python.formatting.provider": "black",
"python.formatting.blackPath": "whataformatter",
"python.formatting.blackArgs": [],Integrate features of commonly used tools. This package provides usual dependencies to develop Python software.
- Simple linter
flake8 a_python_file.pylints a_python_file.py- based on flake8 and plugins: https://gitlab.com/pycqa/flake8
- darglint: https://github.com/terrencepreilly/darglint
- dlint: https://github.com/dlint-py/dlint
- flake8-2020: https://github.com/asottile/flake8-2020
- flake8-aaa: https://github.com/jamescooke/flake8-aaa
- flake8-annotations: https://github.com/sco1/flake8-annotations
- flake8-annotations-complexity: https://github.com/best-doctor/flake8-annotations-complexity
- flake8-annotations-coverage: https://github.com/best-doctor/flake8-annotations-coverage
- flake8-bandit: https://github.com/tylerwince/flake8-bandit
- flake8-blind-except: https://github.com/elijahandrews/flake8-blind-except
- flake8-breakpoint: https://github.com/afonasev/flake8-breakpoint
- flake8-broken-line: https://github.com/sobolevn/flake8-broken-line
- flake8-bugbear: https://github.com/PyCQA/flake8-bugbear
- flake8-builtins: https://github.com/gforcada/flake8-builtins
- flake8-class-attributes-order: https://github.com/best-doctor/flake8-class-attributes-order
- flake8-coding: https://github.com/tk0miya/flake8-coding
- flake8-cognitive-complexity: https://github.com/Melevir/flake8-cognitive-complexity
- flake8-comments: https://github.com/orsinium-labs/flake8-comments
- flake8-comprehensions: https://github.com/adamchainz/flake8-comprehensions
- flake8-debugger: https://github.com/JBKahn/flake8-debugger
- flake8-django: https://github.com/rocioar/flake8-django
- flake8-docstrings: https://gitlab.com/pycqa/flake8-docstrings
- flake8-encoding: https://github.com/python-formate/flake8-encodings
- flake8-eradicate: https://github.com/sobolevn/flake8-eradicate
- flake8-executable: https://github.com/xuhdev/flake8-executable
- flake8-expression-complexity: https://pypi.org/project/flake8-expression-complexity/
- flake8-fastapi: https://pypi.org/project/flake8-fastapi/
- flake8-fixme: https://github.com/tommilligan/flake8-fixme
- flake8-functions: https://github.com/best-doctor/flake8-functions
- flake8-functions-names: https://github.com/Melevir/flake8-functions-names
- flake8-future-annotations: https://github.com/tyleryep/flake8-future-annotations
- flake8-isort: https://github.com/gforcada/flake8-isort
- flake8-literal: https://github.com/plinss/flake8-literal
- flake8-logging-format: https://github.com/globality-corp/flake8-logging-format
- flake8-markdown: https://github.com/johnfraney/flake8-markdown
- flake8-mutable: https://github.com/ebeweber/flake8-mutable
- flake8-no-pep420: https://github.com/adamchainz/flake8-no-pep420
- flake8-noqa: https://pypi.org/project/flake8-noqa/
- flake8-pie: https://github.com/sbdchd/flake8-pie
- flake8-pylint: https://github.com/orsinium-labs/flake8-pylint
- flake8-pyi: https://github.com/PyCQA/flake8-pyi
- flake8-pytest-style: https://github.com/m-burst/flake8-pytest-style
- flake8-quotes: https://github.com/zheller/flake8-quotes/
- flake8-rst-docstrings: https://github.com/peterjc/flake8-rst-docstrings
- flake8-secure-coding-standard: https://github.com/Takishima/flake8-secure-coding-standard
- flake8-simplify: https://github.com/MartinThoma/flake8-simplify
- flake8-slots: https://github.com/python-formate/flake8-slots
- flake8-string-format: https://github.com/xZise/flake8-string-format
- flake8-tidy-imports: https://github.com/adamchainz/flake8-tidy-imports
- flake8-typing-imports: https://github.com/asottile/flake8-typing-imports
- flake8-use-fstring: https://github.com/MichaelKim0407/flake8-use-fstring
- flake8-use-pathlib: https://gitlab.com/RoPP/flake8-use-pathlib
- flake8-useless-assert: https://github.com/decorator-factory/flake8-useless-assert
- flake8-variables-names: https://github.com/best-doctor/flake8-variables-names
- flake8-warnings: https://github.com/orsinium-labs/flake8-warnings
- pandas-vet: https://github.com/deppen8/pandas-vet
- pep8-naming: https://github.com/PyCQA/pep8-naming
- wemake-python-styleguide: https://github.com/wemake-services/wemake-python-styleguide
- Simple formatter
whataformatter a_python_file.pyformats a_python_file.py- based on
- autoflake: https://github.com/myint/autoflake
- black: https://github.com/python/black
- docformatter: https://github.com/PyCQA/docformatter
- isort: https://github.com/PyCQA/isort
- pybetter: https://github.com/lensvol/pybetter
- pycln: https://github.com/hadialqattan/pycln
- pyupgrade: https://github.com/asottile/pyupgrade
- removestar: https://github.com/asmeurer/removestar
- ssort: https://github.com/bwhmather/ssort
- Simple precommit hook
- TODO
BSD 3-Clause license, feel free to contribute: https://python-dev-tools.readthedocs.io/en/latest/contributing.html.
- flake8 formatter to add URL to information on a warning
- documentation
- precommit (flake8, mypy)
- Require Python3.8.1+
- Upgrade to
flake85 (most plugins not available forflake86 yet) - Add
flake8-fastapilinter
- Add
flake8-aaalinter - Add
flake8-blind-exceptlinter - Add
flake8-breakpointlinter - Add
flake8-class-attributes-orderlinter - Add
flake8-cognitive-complexitylinter - Add
flake8-codinglinter - Add
flake8-commentslinter - Add
flake8-djangolinter - Add
flake8-encodinglinter - Add
flake8-executablelinter - Add
flake8-functions-nameslinter - Add
flake8-future-annotationslinter - Add
flake8-literallinter - Add
flake8-markdownlinter - Add
flake8-noqalinter - Add
flake8-no-pep420linter - Add
flake8-pielinter - Add
flake8-pyilinter - Add
flake8-pylintlinter - Add
flake8-secure-coding-standardlinter - Add
flake8-slotslinter - Add
flake8-use-pathliblinter - Add
flake8-useless-assertlinter - Add
flake8-warningslinter - Add
pandas-vetlinter
- Add
docformatterformatter - Add
isortformatter - Add
pybetterformatter - Add
pyclnformatter - Add
removestarformatter - Add
ssortformatter - Remove
cohesionlinter (false warnings on pure data classes such asNamedTuple)
- Add
cohesionlinter - Add
dlintlinter - Add
flake8-annotationslinter - Add
flake8-annotations-complexitylinter - Add
flake8-annotations-coveragelinter - Add
flake8-blacklinter - Add
flake8-expression-complexitylinter - Add
flake8-functionslinter - Add
flake8-pytest-stylelinter - Add
flake8-simplifylinter - Add
flake8-tidy-importslinter - Add
flake8-typing-importslinter - Add
flake8-use-fstringlinter - Remove
flake8-commaslinter that is deprecated - Fix
whataformatterand add--target-versionoption for VS Code compatibility
- The path provided to
whatalintercan be the one of a directory (recursive search of Python files)
- Remove E203 in
flake8forblackcompatibility
- Add
whatalinter_vscodefor Visual Studio Code integration
- Remove some warnings of
wemake-python-styleguide, for instance allow f-strings
- Use
poetry - Remove redundant linters
- Change max line length to 88 (default value of
black) - Replace
pydocstylewithflake8-docstrings - Add
wemake-python-styleguide
- Add
flake8-2020linter
- Add
--quietand--diffflags towhataformatterfor VS Code compatibility
- Add
blackformatter - Add
autoflakeformatter - Add
pyupgradeformatter
- Add
flake8linter - Add
flake8-isortlinter - Add
pep8-naminglinter - Add
flake8-comprehensionslinter - Add
flake8-logging-formatlinter - Add
flake8-bugbearlinter - Add
flake8-builtinslinter - Add
flake8-broken-linelinter - Add
flake8-fixmelinter - Add
flake8-mutablelinter - Add
flake8-debuggerlinter - Add
flake8-variables-nameslinter - Add
flake8-banditlinter
- Add
pydocstylelinter
- Add McCabe complexity checker
- Add
pyflakeslinter - Add
pycodestylelinter
- First release on PyPI.