Skip to content

Commit bc0abe4

Browse files
authored
ci: tweak mypy to check 'google.protobuf' (#310)
Install the 'types-protobuf' package in support.
1 parent 4b40789 commit bc0abe4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

google/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@
2121
except ImportError:
2222
import pkgutil
2323

24+
# See: https://github.com/python/mypy/issues/1422
2425
__path__ = pkgutil.extend_path(__path__, __name__) # type: ignore

mypy.ini

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,3 @@
22
python_version = 3.6
33
namespace_packages = True
44
ignore_missing_imports = True
5-
6-
[mypy-google.protobuf]
7-
ignore_missing_imports = True

noxfile.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ def pytype(session):
170170
def mypy(session):
171171
"""Run type-checking."""
172172
session.install(".[grpc, grpcgcp]", "mypy")
173-
session.install("types-setuptools", "types-requests", "types-mock")
173+
session.install(
174+
"types-setuptools", "types-requests", "types-protobuf", "types-mock"
175+
)
174176
session.run("mypy", "google", "tests")
175177

176178

0 commit comments

Comments
 (0)