googleapis/python-pubsub#500 added type annotation to the codebase, but we only checked that static type analysis passes under pytype. A lot of people, on the other hand, use mypy, but mypy currently reports 97 errors.
If we want users to leverage our type annotations, we should make sure that the checks pass with mypy as well, and then we can also add py.typed file to declare the library type-checked.
An additional requirement of this issue is that a new nox session named mypy needs to be added and enabled by default.
Acceptance criteria:
googleapis/python-pubsub#500 added type annotation to the codebase, but we only checked that static type analysis passes under
pytype. A lot of people, on the other hand, usemypy, butmypycurrently reports 97 errors.If we want users to leverage our type annotations, we should make sure that the checks pass with
mypyas well, and then we can also addpy.typedfile to declare the library type-checked.An additional requirement of this issue is that a new nox session named
mypyneeds to be added and enabled by default.Acceptance criteria:
mypyis added, and it runs on every PR.process: make sure type annoations pass with mypy python-pubsub#542
process: make sure type annoations pass with mypy python-pubsub#542
mypychecks and produces no errors.BLOCKED by Generated code for Pub/Sub does not pass type checks with mypy gapic-generator-python#1092
mypyand the check runs on every PR (process: add mypy session for samples python-pubsub#551).py.typedfile (requires all above items to be completed first)