|
47 | 47 | "unit", |
48 | 48 | "prerelease_deps", |
49 | 49 | "cover", |
50 | | - "pytype", |
51 | | - "mypy", |
52 | 50 | "lint", |
53 | 51 | "lint_setup_py", |
54 | 52 | "blacken", |
@@ -76,6 +74,19 @@ def lint(session): |
76 | 74 | ) |
77 | 75 | session.run("flake8", "google", "tests") |
78 | 76 |
|
| 77 | + """Run type-checking.""" |
| 78 | + session.install(".[grpc]", "pytype") |
| 79 | + session.run("pytype") |
| 80 | + |
| 81 | + session.install(".[grpc,async_rest]", "mypy") |
| 82 | + session.install( |
| 83 | + "types-setuptools", |
| 84 | + "types-requests", |
| 85 | + "types-protobuf", |
| 86 | + "types-dataclasses", |
| 87 | + "types-mock; python_version=='3.7'", |
| 88 | + ) |
| 89 | + session.run("mypy", "google", "tests") |
79 | 90 |
|
80 | 91 | @nox.session(python=DEFAULT_PYTHON_VERSION) |
81 | 92 | def blacken(session): |
@@ -266,27 +277,6 @@ def lint_setup_py(session): |
266 | 277 | session.run("python", "setup.py", "check", "--restructuredtext", "--strict") |
267 | 278 |
|
268 | 279 |
|
269 | | -@nox.session(python=DEFAULT_PYTHON_VERSION) |
270 | | -def pytype(session): |
271 | | - """Run type-checking.""" |
272 | | - session.install(".[grpc]", "pytype") |
273 | | - session.run("pytype") |
274 | | - |
275 | | - |
276 | | -@nox.session(python=DEFAULT_PYTHON_VERSION) |
277 | | -def mypy(session): |
278 | | - """Run type-checking.""" |
279 | | - session.install(".[grpc,async_rest]", "mypy") |
280 | | - session.install( |
281 | | - "types-setuptools", |
282 | | - "types-requests", |
283 | | - "types-protobuf", |
284 | | - "types-dataclasses", |
285 | | - "types-mock; python_version=='3.7'", |
286 | | - ) |
287 | | - session.run("mypy", "google", "tests") |
288 | | - |
289 | | - |
290 | 280 | @nox.session(python=DEFAULT_PYTHON_VERSION) |
291 | 281 | def cover(session): |
292 | 282 | """Run the final coverage report. |
|
0 commit comments