Skip to content

Commit

Permalink
Check style in CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
jendrikseipp committed Mar 8, 2020
1 parent 20a160c commit 7e782af
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
run: |
python -m pip install --upgrade pip tox
#- name: Check style
# if: matrix.python-version == '3.6'
# run: |
# tox -e style
- name: Check style
if: matrix.python-version == '3.6'
run: |
tox -e style
- name: Run tests
run: |
Expand Down
20 changes: 20 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# NOTE: you have to use single-quoted strings in TOML for regular expressions.
# It's the equivalent of r-strings in Python. Multiline strings are treated as
# verbose regular expressions by Black. Use [ ] to denote a significant space
# character.

[tool.black]
line-length = 88
target-version = ['py35', 'py36', 'py37', 'py38']
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.tox
| \.venv
| _build
| build
| dist
)/
'''
16 changes: 15 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; Run all tests with "tox".
[tox]
envlist = py35, py36, py37, py38
envlist = py35, py36, py37, py38, style
basepython = python3
skip_missing_interpreters = true

Expand All @@ -9,3 +9,17 @@ deps =
pytest
commands =
pytest src/tests

[testenv:style]
skipsdist = true
deps =
black
commands =
black --check .

[testenv:fix-style]
skipsdist = true
deps =
black
commands =
black .

0 comments on commit 7e782af

Please sign in to comment.