- Code line length: 120
- Use double quotes as default (don't mix and match for simple quoting, checked with pylint).
- Configuration:
.pylint.rc
for pylint.pyproject.toml
for isort.
TBD if pyproject.toml is the right approach. This is not a library and we are new to Python build systems...setup.cfg
for flake8.
Install all code linting tools:
pip3 install -r test-requirements.txt
The following tests are run as GitHub action for each push on the main branch and for pull requests. They can also be run anytime on a local developer machine:
python -m pylint intg-denonavr
python -m flake8 intg-denonavr --count --show-source --statistics
python -m isort intg-denonavr/. --check --verbose
python -m black intg-denonavr --check --verbose --line-length 120
Linting integration in PyCharm/IntelliJ IDEA:
- Install plugin Pylint
- Open Pylint window and run a scan:
Check Module
orCheck Current File
python -m black intg-denonavr --line-length 120
PyCharm/IntelliJ IDEA integration:
- Go to
Preferences or Settings -> Tools -> Black
- Configure:
- Python interpreter
- Use Black formatter:
On code reformat
& optionallyOn save
- Arguments:
--line-length 120
python -m isort intg-denonavr/.