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:
19
pyproject.toml
Normal file
19
pyproject.toml
Normal file
@@ -0,0 +1,19 @@
|
||||
[tool.black]
|
||||
force-exclude = '^/tests/test_settings/settings_.*\.py'
|
||||
max-line-length = 88
|
||||
target-version = ["py36"]
|
||||
|
||||
[tool.doc8]
|
||||
# ignore very long lines in ESP support table:
|
||||
ignore-path-errors = ["docs/esps/index.rst;D001"]
|
||||
# for now, Anymail allows longer lines in docs source:
|
||||
max-line-length = 120
|
||||
|
||||
[tool.flake8]
|
||||
# See .flake8 file in project root
|
||||
|
||||
[tool.isort]
|
||||
combine_as_imports = true
|
||||
known_first_party = "anymail"
|
||||
profile = "black"
|
||||
py_version = "36"
|
||||
Reference in New Issue
Block a user