Skip to content

Commit b3089bf

Browse files
authoredAug 8, 2023
Merge pull request #2126 from pytorch/mypy
Improve Python tooling
2 parents 8c62fca + 2c327c4 commit b3089bf

File tree

149 files changed

+1659
-1309
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+1659
-1309
lines changed
 

‎.pre-commit-config.yaml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
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
8+
exclude: ^docs
89
- id: check-added-large-files
910
args:
1011
- --maxkb=1000
@@ -13,18 +14,14 @@ repos:
1314
- id: mixed-line-ending
1415
args:
1516
- --fix=lf
16-
- repo: https://github.com/psf/black
17-
rev: 22.6.0
18-
hooks:
19-
- id: black
20-
exclude: ^examples/custom_converters/elu_converter/setup.py
17+
exclude: ^docs
2118
- repo: https://github.com/pre-commit/mirrors-clang-format
22-
rev: v14.0.6
19+
rev: v16.0.6
2320
hooks:
2421
- id: clang-format
2522
types_or: [c++, c, cuda]
2623
- repo: https://github.com/keith/pre-commit-buildifier
27-
rev: 5.1.0
24+
rev: 6.1.0.2
2825
hooks:
2926
- id: buildifier
3027
args:
@@ -34,6 +31,26 @@ repos:
3431
rev: v0.13
3532
hooks:
3633
- id: validate-pyproject
34+
- repo: https://github.com/pycqa/isort
35+
rev: 5.12.0
36+
hooks:
37+
- id: isort
38+
name: isort (python)
39+
- repo: https://github.com/pre-commit/mirrors-mypy
40+
rev: 'v1.4.1'
41+
hooks:
42+
- id: mypy
43+
exclude: "^py/torch_tensorrt/fx|^examples|^tests|^tools|^docs|noxfile.py|setup.py|versions.py"
44+
- repo: https://github.com/astral-sh/ruff-pre-commit
45+
# Ruff version.
46+
rev: v0.0.278
47+
hooks:
48+
- id: ruff
49+
- repo: https://github.com/psf/black
50+
rev: 23.7.0
51+
hooks:
52+
- id: black
53+
exclude: ^examples/custom_converters/elu_converter/setup.py|^docs
3754
- repo: local
3855
hooks:
3956
- id: dont-commit-upstream
@@ -42,4 +59,3 @@ repos:
4259
exclude: "^.pre-commit-config.yaml"
4360
language: pygrep
4461
types: [text]
45-

‎BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ pkg_tar(
4747
":windows": ["//cpp/lib:torch_tensorrt.dll"],
4848
"//conditions:default": [
4949
"//cpp/lib:libtorchtrt.so",
50-
"//cpp/lib:libtorchtrt_runtime.so",
5150
"//cpp/lib:libtorchtrt_plugins.so",
51+
"//cpp/lib:libtorchtrt_runtime.so",
5252
],
5353
}),
5454
mode = "0755",
@@ -74,9 +74,9 @@ pkg_tar(
7474
extension = "tar.gz",
7575
package_dir = "torch_tensorrt",
7676
deps = [
77-
":lib",
7877
":include",
7978
":include_core",
79+
":lib",
8080
] + select({
8181
":windows": [],
8282
"//conditions:default": [":bin"],

0 commit comments

Comments
 (0)