Add tests for Black, and ignore reformat blame
Change-Id: Ie6c6933a46c4aedf559713d37900ecd617e93885
This commit is contained in:
parent
2c62daf542
commit
46045d407c
2
.git-blame-ignore-revs
Normal file
2
.git-blame-ignore-revs
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Reformat to Black:
|
||||||
|
2c62daf54207a4a772c2c5942e4bd88e75d7f463
|
19
.zuul.yaml
19
.zuul.yaml
@ -1,6 +1,25 @@
|
|||||||
|
- job:
|
||||||
|
name: adjutant-black-style-check
|
||||||
|
parent: tox
|
||||||
|
description: |
|
||||||
|
Runs black linting tests.
|
||||||
|
|
||||||
|
Uses tox with the ``black`` environment.
|
||||||
|
vars:
|
||||||
|
tox_envlist: black_check
|
||||||
|
test_setup_skip: true
|
||||||
|
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
templates:
|
templates:
|
||||||
- publish-openstack-docs-pti
|
- publish-openstack-docs-pti
|
||||||
- build-release-notes-jobs-python3
|
- build-release-notes-jobs-python3
|
||||||
- openstack-cover-jobs
|
- openstack-cover-jobs
|
||||||
- openstack-python3-ussuri-jobs
|
- openstack-python3-ussuri-jobs
|
||||||
|
check:
|
||||||
|
jobs:
|
||||||
|
- adjutant-black-style-check
|
||||||
|
gate:
|
||||||
|
queue: adjutant
|
||||||
|
jobs:
|
||||||
|
- adjutant-black-style-check
|
@ -9,3 +9,4 @@ doc8>=0.8.0 # Apache-2.0
|
|||||||
mock>=3.0.0 # BSD
|
mock>=3.0.0 # BSD
|
||||||
Pygments>=2.2.0 # BSD license
|
Pygments>=2.2.0 # BSD license
|
||||||
flake8-bugbear>=19.3.0;python_version>='3.4' # MIT
|
flake8-bugbear>=19.3.0;python_version>='3.4' # MIT
|
||||||
|
black>=19.3b0;python_version>='3.4' # MIT
|
12
tox.ini
12
tox.ini
@ -52,7 +52,7 @@ commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenote
|
|||||||
[flake8]
|
[flake8]
|
||||||
max-line-length = 88
|
max-line-length = 88
|
||||||
select = C,E,F,W,B,B950
|
select = C,E,F,W,B,B950
|
||||||
ignore = D100,D101,D102,D103,D104,D105,D200,D203,D202,D204,D205,D208,D400,D401,W503,E231,E501
|
ignore = D100,D101,D102,D103,D104,D105,D200,D203,D202,D204,D205,D208,D400,D401,W503,E203,E231,E501
|
||||||
show-source = true
|
show-source = true
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude=.venv,venv,.env,env,.git,.tox,dist,doc,*lib/python*,*egg,releasenotes,adjutant/api/migrations/*,adjutant/actions/migrations,adjutant/tasks/migrations
|
exclude=.venv,venv,.env,env,.git,.tox,dist,doc,*lib/python*,*egg,releasenotes,adjutant/api/migrations/*,adjutant/actions/migrations,adjutant/tasks/migrations
|
||||||
@ -60,3 +60,13 @@ exclude=.venv,venv,.env,env,.git,.tox,dist,doc,*lib/python*,*egg,releasenotes,ad
|
|||||||
[doc8]
|
[doc8]
|
||||||
ignore-path=.tox,*.egg-info,doc/build,releasenotes/build,api-ref/build,.eggs/*/EGG-INFO/*.txt,./*.txt,adjutant
|
ignore-path=.tox,*.egg-info,doc/build,releasenotes/build,api-ref/build,.eggs/*/EGG-INFO/*.txt,./*.txt,adjutant
|
||||||
extension=.txt,.rst,.inc
|
extension=.txt,.rst,.inc
|
||||||
|
|
||||||
|
[testenv:black]
|
||||||
|
basepython = python3
|
||||||
|
commands =
|
||||||
|
black -t py36 .
|
||||||
|
|
||||||
|
[testenv:black_check]
|
||||||
|
basepython = python3
|
||||||
|
commands =
|
||||||
|
black -t py36 --check .
|
||||||
|
Loading…
x
Reference in New Issue
Block a user