Skip to content

Commit 6fd5d6a

Browse files
committed
chore: Upgrade pre-commit versions and add mypy
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent bfb167f commit 6fd5d6a

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
exclude: ^.github/actions/assigner/dist
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v2.3.0
4+
rev: v4.4.0
55
hooks:
66
- id: check-yaml
77
- id: trailing-whitespace
@@ -14,17 +14,17 @@ repos:
1414
args:
1515
- --fix=lf
1616
- repo: https://github.com/psf/black
17-
rev: 22.6.0
17+
rev: 23.7.0
1818
hooks:
1919
- id: black
2020
exclude: ^examples/custom_converters/elu_converter/setup.py
2121
- repo: https://github.com/pre-commit/mirrors-clang-format
22-
rev: v14.0.6
22+
rev: v16.0.6
2323
hooks:
2424
- id: clang-format
2525
types_or: [c++, c, cuda]
2626
- repo: https://github.com/keith/pre-commit-buildifier
27-
rev: 5.1.0
27+
rev: 6.1.0.2
2828
hooks:
2929
- id: buildifier
3030
args:
@@ -34,6 +34,10 @@ repos:
3434
rev: v0.13
3535
hooks:
3636
- id: validate-pyproject
37+
- repo: https://github.com/pre-commit/mirrors-mypy
38+
rev: 'v1.4.1'
39+
hooks:
40+
- id: mypy
3741
- repo: local
3842
hooks:
3943
- id: dont-commit-upstream

pyproject.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,20 @@ elu_converter/setup.py
6969
"""
7070

7171
[tool.mypy]
72+
strict = true
73+
ignore_missing_imports = true
7274
show_error_codes = true
7375
disable_error_code = "attr-defined"
7476
no_implicit_optional = true
77+
exclude = [
78+
"py/torch_tensorrt/fx/",
79+
"torch_tensorrt/fx/",
80+
"py/torch_tensorrt/_C.so",
81+
"examples/",
82+
"docs/",
83+
"docsrc/",
84+
"tests/",
85+
]
7586

7687
[tool.setuptools]
7788
package-dir = {"" = "py"}

0 commit comments

Comments
 (0)