Skip to content

Commit 726b71e

Browse files
committed
chore: updates mypy session
1 parent d602b90 commit 726b71e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

packages/google-cloud-spanner/noxfile.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,26 @@ def mypy(session):
659659
session.skip("mypy tests are not yet supported")
660660

661661

662+
@nox.session(python=ALL_PYTHON)
663+
def mypy(session):
664+
"""Run the type checker."""
665+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2579):
666+
# use the latest version of mypy
667+
session.install(
668+
"mypy<1.16.0",
669+
"types-requests",
670+
"types-protobuf",
671+
)
672+
session.install(".")
673+
session.run(
674+
"mypy",
675+
"-p",
676+
"google",
677+
"--check-untyped-defs",
678+
*session.posargs,
679+
)
680+
681+
662682
@nox.session(python=DEFAULT_PYTHON_VERSION)
663683
def core_deps_from_source(session):
664684
"""Run all tests with core dependencies installed from source

0 commit comments

Comments
 (0)