Needed and up-to-date tools to develop in Python
Project description
Needed and up-to-date tools to develop in Python (WORK IN PROGRESS)
Supported Python versions: the same as the classic Python interpreter (CPython)
Documentation
The full documentation can be read at https://python-dev-tools.readthedocs.io.
Installation
In a terminal, run:
$ python3 -m pip install python-dev-tools --user --upgrade
Full 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.
Installation with Visual Studio Code
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 flake8 from python-dev-tools is in your PYTHON_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": [],
Features
Integrate features of commonly used tools. This package provides usual dependencies to develop Python software.
Simple linter
flake8 a_python_file.py lints a_python_file.py
based on flake8 and plugins: https://gitlab.com/pycqa/flake8
flake8-2020: https://github.com/asottile/flake8-2020
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-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-comprehensions: https://github.com/adamchainz/flake8-comprehensions
flake8-debugger: https://github.com/JBKahn/flake8-debugger
flake8-docstrings: https://gitlab.com/pycqa/flake8-docstrings
flake8-eradicate: https://github.com/sobolevn/flake8-eradicate
flake8-expression-complexity: https://pypi.org/project/flake8-expression-complexity/
flake8-fixme: https://github.com/tommilligan/flake8-fixme
flake8-functions: https://github.com/best-doctor/flake8-functions
flake8-isort: https://github.com/gforcada/flake8-isort
flake8-logging-format: https://github.com/globality-corp/flake8-logging-format
flake8-mutable: https://github.com/ebeweber/flake8-mutable
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-simplify: https://github.com/MartinThoma/flake8-simplify
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-variables-names: https://github.com/best-doctor/flake8-variables-names
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.py formats a_python_file.py
based on
autoflake: https://github.com/myint/autoflake
docformatter: https://github.com/PyCQA/docformatter
pybetter: https://github.com/lensvol/pybetter
pyupgrade: https://github.com/asottile/pyupgrade
removestar: https://github.com/asmeurer/removestar
Simple precommit hook
TODO
License
BSD 3-Clause license, feel free to contribute: https://python-dev-tools.readthedocs.io/en/latest/contributing.html.
TODO
flake8 formatter to add URL to information on a warning
documentation
precommit
Changelog
2022.5.26
Add docformatter formatter
Add isort formatter
Add pybetter formatter
Add pycln formatter
Add removestar formatter
Add ssort formatter
Remove cohesion linter (false warnings on pure data classes such as NamedTuple)
2022.5.20
Add cohesion linter
Add dlint linter
Add flake8-annotations linter
Add flake8-annotations-complexity linter
Add flake8-annotations-coverage linter
Add flake8-black linter
Add flake8-expression-complexity linter
Add flake8-functions linter
Add flake8-pytest-style linter
Add flake8-simplify linter
Add flake8-tidy-imports linter
Add flake8-typing-imports linter
Add flake8-use-fstring linter
Remove flake8-commas linter that is deprecated
Fix whataformatter and add --target-version option for VS Code compatibility
2020.9.10
The path provided to whatalinter can be the one of a directory (recursive search of Python files)
2020.9.7
Remove E203 in flake8 for black compatibility
2020.9.4
Add whatalinter_vscode for Visual Studio Code integration
2020.9.2
Remove some warnings of wemake-python-styleguide, for instance allow f-strings
2020.9.1
Use poetry
Remove redundant linters
Change max line length to 88 (default value of black)
Replace pydocstyle with flake8-docstrings
Add wemake-python-styleguide
2019.10.22
Add flake8-2020 linter
2019.07.21
Add --quiet and --diff flags to whataformatter for VS Code compatibility
2019.07.20
Add black formatter
Add autoflake formatter
Add pyupgrade formatter
2019.04.08
Add flake8 linter
Add flake8-isort linter
Add pep8-naming linter
Add flake8-comprehensions linter
Add flake8-logging-format linter
Add flake8-bugbear linter
Add flake8-builtins linter
Add flake8-broken-line linter
Add flake8-fixme linter
Add flake8-mutable linter
Add flake8-debugger linter
Add flake8-variables-names linter
Add flake8-bandit linter
2019.03.02
Add pydocstyle linter
2019.03.01
Add McCabe complexity checker
2019.02.26
Add pyflakes linter
Add pycodestyle linter
2019.02.23
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for python_dev_tools-2022.5.26.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 560767bd202e818c511e52c95d8473573d754581df88eb83ab7dac45ce441f66 |
|
MD5 | d7ec7ef81832a83c6cf2197234411821 |
|
BLAKE2b-256 | d223d24101ba369efec691da49765d3c4346129cb604adbe69782a783cea89d0 |
Hashes for python_dev_tools-2022.5.26-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38655a9fde85ba9cd0c6aae88ee7bd29a8f1dad1c2e0f447c0eb54a2b7de7080 |
|
MD5 | 4517243ee71004d0ab07e3cc86d1dbe7 |
|
BLAKE2b-256 | f1dcd5074075e2dfa6654a7cf94fd753af16bb32aba11db46007db9d07fe2ba7 |