From 5d9623a26dc9baf33d60b4315db3c83b467e3689 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Thu, 18 Nov 2021 09:28:06 -0500 Subject: [PATCH] ci: tweak mypy to check 'google.protobuf' Install the 'types-protobuf' package in support. --- google/__init__.py | 1 + mypy.ini | 3 --- noxfile.py | 4 +++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/google/__init__.py b/google/__init__.py index 70a7bd99..9f1d5491 100644 --- a/google/__init__.py +++ b/google/__init__.py @@ -21,4 +21,5 @@ except ImportError: import pkgutil + # See: https://github.com/python/mypy/issues/1422 __path__ = pkgutil.extend_path(__path__, __name__) # type: ignore diff --git a/mypy.ini b/mypy.ini index 5663b40d..5c111571 100644 --- a/mypy.ini +++ b/mypy.ini @@ -2,6 +2,3 @@ python_version = 3.6 namespace_packages = True ignore_missing_imports = True - -[mypy-google.protobuf] -ignore_missing_imports = True diff --git a/noxfile.py b/noxfile.py index ac1bdd14..db37c561 100644 --- a/noxfile.py +++ b/noxfile.py @@ -170,7 +170,9 @@ def pytype(session): def mypy(session): """Run type-checking.""" session.install(".[grpc, grpcgcp]", "mypy") - session.install("types-setuptools", "types-requests", "types-mock") + session.install( + "types-setuptools", "types-requests", "types-protobuf", "types-mock" + ) session.run("mypy", "google", "tests")