Skip to content

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/.

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.

3 participants