File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ branchProtectionRules:
12
12
- ' cla/google'
13
13
- ' docs'
14
14
- ' lint'
15
+ - ' mypy'
15
16
- ' unit (3.9)'
16
17
- ' unit (3.10)'
17
18
- ' unit (3.11)'
Original file line number Diff line number Diff line change
1
+ on :
2
+ pull_request :
3
+ branches :
4
+ - main
5
+ name : mypy
6
+ jobs :
7
+ mypy :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - name : Checkout
11
+ uses : actions/checkout@v4
12
+ - name : Setup Python
13
+ uses : actions/setup-python@v5
14
+ with :
15
+ python-version : " 3.10"
16
+ - name : Install nox
17
+ run : |
18
+ python -m pip install --upgrade setuptools pip wheel
19
+ python -m pip install nox
20
+ - name : Run mypy
21
+ run : |
22
+ nox -s mypy
Original file line number Diff line number Diff line change @@ -145,7 +145,12 @@ def lint(session):
145
145
Returns a failure if the linters find linting errors or sufficiently
146
146
serious code quality issues.
147
147
"""
148
- session .install ("flake8" , BLACK_VERSION )
148
+ session .install ("flake8" , BLACK_VERSION , ISORT_VERSION )
149
+ session .run (
150
+ "isort" ,
151
+ "--check" ,
152
+ * LINT_PATHS ,
153
+ )
149
154
session .run (
150
155
"black" ,
151
156
"--check" ,
You can’t perform that action at this time.
0 commit comments