Skip to content

Commit

Permalink
feat: python typing (#646)
Browse files Browse the repository at this point in the history
* feat: python typing

* Update noxfile.py

Co-authored-by: IlyaFaer <ilya.faer@mail.ru>
Co-authored-by: Astha Mohta <35952883+asthamohta@users.noreply.github.com>
  • Loading branch information
3 people committed Jul 8, 2022
1 parent 19caf44 commit 169019f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion google/cloud/spanner_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

from .services.spanner import SpannerClient
from .types.commit_response import CommitResponse
Expand Down
3 changes: 2 additions & 1 deletion google/cloud/spanner_v1/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import google.api_core.operation
from google.api_core.exceptions import InvalidArgument
import re
import typing

from google.protobuf.empty_pb2 import Empty
from google.protobuf.field_mask_pb2 import FieldMask
Expand All @@ -42,7 +43,7 @@
DEFAULT_NODE_COUNT = 1
PROCESSING_UNITS_PER_NODE = 1000

_OPERATION_METADATA_MESSAGES = (
_OPERATION_METADATA_MESSAGES: typing.Tuple = (
backup.Backup,
backup.CreateBackupMetadata,
backup.CopyBackupMetadata,
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/spanner_v1/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class _SnapshotBase(_SessionWrapper):
"""

_multi_use = False
_read_only = True
_read_only: bool = True
_transaction_id = None
_read_request_count = 0
_execute_sql_count = 0
Expand Down

0 comments on commit 169019f

Please sign in to comment.