-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: python typing #646
feat: python typing #646
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we would be testing google/
and tests/
, and without the --ignore-missing-imports
flag (the --no-incremental
flat shouldn't be needed, either -- one can just remove .mypy_cache
to blow the cache away). That would likely require adding some more types-
packages (e.g. types-protobuf
, types-mock
).
We would then be adding py.typed
to the remaining subdirs of google/cloud/
, in particular, to google/cloud/spanner_dbapi/
.
@@ -18,7 +18,7 @@ | |||
|
|||
import pkg_resources | |||
|
|||
__version__ = pkg_resources.get_distribution("google-cloud-spanner").version | |||
__version__: str = pkg_resources.get_distribution("google-cloud-spanner").version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This annotation shouldn't be needed, since you have installed types-setuptools
in the nox session.
Towards #625
py.typed
file is already added into the repository and is included in the package. Implementing a newnox
session to check types withmypy
.