Enforce Black formatter

This commit is contained in:
Oleh Prypin
2022-08-06 16:23:11 +02:00
parent dca7cbb43f
commit 58a99e5b38
6 changed files with 16 additions and 4 deletions

View File

@@ -66,6 +66,9 @@ jobs:
- name: Install Node dependencies
run: |
npm install -g markdownlint-cli jshint csslint
- name: Check with black
if: always()
run: python -m tox -e black && git diff --exit-code
- name: Check with flake8
if: always()
run: python -m tox -e flake8

View File

@@ -1,5 +1,5 @@
babel==2.9.0
click==3.3
click==8.0
Jinja2==2.10.2
markupsafe<=2.0.1
Markdown==3.3

View File

@@ -1,5 +1,5 @@
babel>=2.9.0
click>=7.0
click>=8.0
Jinja2>=2.10.2
Markdown>=3.3,<3.4
PyYAML>=5.2

View File

@@ -1,2 +1,3 @@
coverage
black
flake8

View File

@@ -1,6 +1,10 @@
[metadata]
license_file = LICENSE
[flake8]
max-line-length = 119
extend-ignore = E203
[compile_catalog]
statistics = True
domain = messages

View File

@@ -1,7 +1,7 @@
[tox]
envlist =
py{36,37,38,39,310,py3}-{unittests,min-req,integration,integration-no-babel},
flake8, markdown-lint, linkchecker, jshint, csslint, nobabel, codespell
black, flake8, markdown-lint, linkchecker, jshint, csslint, nobabel, codespell
[testenv]
passenv = LANG
@@ -16,9 +16,13 @@ commands=
py{36,37,38,39,310,py3}-unittests: {envbindir}/coverage report --show-missing
py{36,37,38,39,310,py3}-integration: {envpython} -m mkdocs.tests.integration --output={envtmpdir}/builds
[testenv:black]
deps=-rrequirements/test.txt
commands={envbindir}/black -l100 -tpy36 --skip-string-normalization mkdocs
[testenv:flake8]
deps=-rrequirements/test.txt
commands={envbindir}/flake8 mkdocs --max-line-length=119
commands={envbindir}/flake8 mkdocs
[testenv:markdown-lint]
whitelist_externals=