Skip to content

Commit 4ddd853

Browse files
committed
tests: refactor lint nox sessions
1 parent 54d1d36 commit 4ddd853

File tree

2 files changed

+11
-43
lines changed

2 files changed

+11
-43
lines changed

.github/workflows/mypy.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

noxfile.py

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@ def lint(session):
7070
)
7171
session.run("flake8", "google", "tests")
7272

73+
"""Run type-checking."""
74+
session.install(".[grpc,async_rest]", "mypy")
75+
session.install(
76+
"types-setuptools",
77+
"types-requests",
78+
"types-protobuf",
79+
"types-dataclasses",
80+
"types-mock; python_version=='3.7'",
81+
)
82+
session.run("mypy", "google", "tests")
83+
7384

7485
@nox.session(python=DEFAULT_PYTHON_VERSION)
7586
def blacken(session):
@@ -265,27 +276,6 @@ def lint_setup_py(session):
265276
session.run("python", "setup.py", "check", "--restructuredtext", "--strict")
266277

267278

268-
@nox.session(python=DEFAULT_PYTHON_VERSION)
269-
def pytype(session):
270-
"""Run type-checking."""
271-
session.install(".[grpc]", "pytype")
272-
session.run("pytype")
273-
274-
275-
@nox.session(python=DEFAULT_PYTHON_VERSION)
276-
def mypy(session):
277-
"""Run type-checking."""
278-
session.install(".[grpc,async_rest]", "mypy")
279-
session.install(
280-
"types-setuptools",
281-
"types-requests",
282-
"types-protobuf",
283-
"types-dataclasses",
284-
"types-mock; python_version=='3.7'",
285-
)
286-
session.run("mypy", "google", "tests")
287-
288-
289279
@nox.session(python=DEFAULT_PYTHON_VERSION)
290280
def cover(session):
291281
"""Run the final coverage report.

0 commit comments

Comments
 (0)