Skip to content
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

Merged
merged 4 commits into from
Jul 8, 2022
Merged

feat: python typing #646

merged 4 commits into from
Jul 8, 2022

Conversation

IlyaFaer
Copy link
Contributor

@IlyaFaer IlyaFaer commented Nov 26, 2021

Towards #625

py.typed file is already added into the repository and is included in the package. Implementing a new nox session to check types with mypy.

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Nov 26, 2021
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner API. label Nov 26, 2021
@IlyaFaer IlyaFaer marked this pull request as ready for review November 29, 2021 08:13
@IlyaFaer IlyaFaer requested review from a team as code owners November 29, 2021 08:13
@IlyaFaer IlyaFaer requested a review from larkee November 29, 2021 08:13
Copy link
Contributor

@tseaver tseaver left a 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
Copy link
Contributor

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.

@product-auto-label product-auto-label bot added the size: xs Pull request size is extra small. label Jul 7, 2022
@asthamohta asthamohta added the automerge Merge the pull request once unit tests and other checks pass. label Jul 8, 2022
@asthamohta asthamohta merged commit 169019f into googleapis:main Jul 8, 2022
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jul 8, 2022
@IlyaFaer IlyaFaer deleted the types branch July 8, 2022 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner API. cla: yes This human has signed the Contributor License Agreement. size: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants