Skip to content

Commit b863954

Browse files
authored
Bump linters and enable mypy (#60)
1 parent 2661050 commit b863954

File tree

2 files changed

+34
-5
lines changed

2 files changed

+34
-5
lines changed

.pre-commit-config.yaml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,37 @@
11
---
22
repos:
3-
- repo: https://github.com/pre-commit/pre-commit-hooks.git
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
44
rev: v2.3.0 # Use the ref you want to point at
55
hooks:
66
- id: trailing-whitespace
77
- id: check-yaml
88
- id: end-of-file-fixer
9-
- id: flake8
109
- id: trailing-whitespace
1110
- id: check-executables-have-shebangs
1211
- repo: https://github.com/python/black
13-
rev: 19.3b0
12+
rev: 21.7b0
1413
hooks:
1514
- id: black
16-
- repo: https://gitlab.com/pycqa/flake8.git
17-
rev: 3.7.8
15+
- repo: https://github.com/pycqa/flake8
16+
rev: 3.9.2
1817
hooks:
1918
- id: flake8
19+
- repo: https://github.com/pre-commit/mirrors-mypy
20+
rev: v0.910
21+
hooks:
22+
- id: mypy
23+
# empty args needed in order to match mypy cli behavior
24+
args: []
25+
entry: mypy doc8/
26+
pass_filenames: false
27+
additional_dependencies:
28+
- types-mock
29+
- types-setuptools
30+
- types-docutils
31+
- types-toml
32+
# TODO: activate pylint
33+
# - repo: https://github.com/PyCQA/pylint
34+
# rev: v2.9.3
35+
# hooks:
36+
# - id: pylint
37+
# additional_dependencies: []

mypy.ini

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[mypy-pbr]
2+
ignore_missing_imports = True
3+
4+
[mypy-restructuredtext_lint]
5+
ignore_missing_imports = True
6+
7+
[mypy-stevedore]
8+
ignore_missing_imports = True
9+
10+
[mypy-testtools]
11+
ignore_missing_imports = True

0 commit comments

Comments
 (0)