Skip to content

Commit acd360c

Browse files
committed
Consistent exclude between flake8, black and mypy.
1 parent 534d742 commit acd360c

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ jobs:
3131
- name: Format code
3232
run: |
3333
# Check code follows black formatting.
34-
black --check mava tests
34+
black --check .
3535
# stop the build if there are Python syntax errors or undefined names
36-
flake8 mava tests --count --select=E9,F63,F7,F82 --show-source --statistics
36+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3737
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
38-
flake8 mava tests --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
38+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3939
- name: Check types with mypy
4040
run: |
41-
mypy . --exclude ^docs/
41+
mypy . --exclude docs/
4242
- name: Test with pytest
4343
run: |
4444
pytest -n "$(grep -c ^processor /proc/cpuinfo)" tests

.pre-commit-config.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Pre-commit hooks for repo.
32

43
# Packages:
@@ -10,8 +9,7 @@
109
# mypy: Static typing.
1110
# blacken-docs: Checks docs follow black format standard.
1211

13-
14-
default_stages: [ "commit", "push" ]
12+
default_stages: ["commit", "push"]
1513
repos:
1614
- repo: https://github.com/pre-commit/pre-commit-hooks
1715
rev: v3.4.0
@@ -24,7 +22,6 @@ repos:
2422
- id: mixed-line-ending
2523
- id: check-yaml
2624

27-
2825
- repo: https://github.com/psf/black
2926
rev: 20.8b1
3027
hooks:
@@ -34,7 +31,7 @@ repos:
3431
- repo: https://github.com/asottile/pyupgrade
3532
rev: v2.10.0
3633
hooks:
37-
- id: pyupgrade
34+
- id: pyupgrade
3835

3936
- repo: https://github.com/timothycrosley/isort
4037
rev: 5.7.0
@@ -50,11 +47,11 @@ repos:
5047
- repo: https://github.com/pre-commit/mirrors-mypy
5148
rev: v0.812
5249
hooks:
53-
- id: mypy
50+
- id: mypy
5451
exclude: ^docs/
5552

5653
- repo: https://github.com/asottile/blacken-docs
5754
rev: v1.8.0
5855
hooks:
59-
- id: blacken-docs
56+
- id: blacken-docs
6057
additional_dependencies: [black==20.8b1]

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ exclude = '''
1919
| \.mypy_cache
2020
| \.tox
2121
| \.venv
22+
| \.pytype
2223
| _build
2324
| buck-out
2425
| build
2526
| dist
2627
| proto
28+
| docs
2729
)/
2830
)
2931
'''

0 commit comments

Comments
 (0)