mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Apply code styles via pre-commit
- Add black and isort for Python styling - Add doc8 for reStructuredText styling - Add prettier for css/html/js/md/yaml styling - Run all styling tools from pre-commit hooks - Adjust flake8 config for compatibility with black (and current Django style) - Add some other helpful pre-commit hooks - Update editorconfig to match Django (with a few necessary adjustments for Anymail) - Update `tox -e lint` to run all pre-commit hooks - Update contributing docs
This commit is contained in:
11
.flake8
11
.flake8
@@ -1,2 +1,11 @@
|
||||
[flake8]
|
||||
max-line-length = 120
|
||||
extend-exclude =
|
||||
build,
|
||||
tests/test_settings/settings_*.py
|
||||
|
||||
# Black compatibility:
|
||||
# - E203 (spaces around slice operators) is not PEP-8 compliant (and Black _is_)
|
||||
# - Black sometimes deliberately overruns max-line-length by a small amount
|
||||
# (97 is Black's max-line-length of 88 + 10%)
|
||||
extend-ignore = E203
|
||||
max-line-length = 97
|
||||
|
||||
Reference in New Issue
Block a user