Skip to content

Commit af0f895

Browse files
committed
consolidate presubmits
1 parent fc844ad commit af0f895

File tree

1 file changed

+13
-23
lines changed

1 file changed

+13
-23
lines changed

packages/google-api-core/noxfile.py

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@
4747
"unit",
4848
"prerelease_deps",
4949
"cover",
50-
"pytype",
51-
"mypy",
5250
"lint",
5351
"lint_setup_py",
5452
"blacken",
@@ -76,6 +74,19 @@ def lint(session):
7674
)
7775
session.run("flake8", "google", "tests")
7876

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")
7990

8091
@nox.session(python=DEFAULT_PYTHON_VERSION)
8192
def blacken(session):
@@ -266,27 +277,6 @@ def lint_setup_py(session):
266277
session.run("python", "setup.py", "check", "--restructuredtext", "--strict")
267278

268279

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-
290280
@nox.session(python=DEFAULT_PYTHON_VERSION)
291281
def cover(session):
292282
"""Run the final coverage report.

0 commit comments

Comments
 (0)