mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 09:58:31 +07:00
Enforce Black formatter
This commit is contained in:
3
.github/workflows/tox.yml
vendored
3
.github/workflows/tox.yml
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
coverage
|
||||
black
|
||||
flake8
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
[metadata]
|
||||
license_file = LICENSE
|
||||
|
||||
[flake8]
|
||||
max-line-length = 119
|
||||
extend-ignore = E203
|
||||
|
||||
[compile_catalog]
|
||||
statistics = True
|
||||
domain = messages
|
||||
|
||||
8
tox.ini
8
tox.ini
@@ -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=
|
||||
|
||||
Reference in New Issue
Block a user