Skip to content

Commit 169019f

Browse files
IlyaFaerIlyaFaerasthamohta
authored
feat: python typing (#646)
* feat: python typing * Update noxfile.py Co-authored-by: IlyaFaer <[email protected]> Co-authored-by: Astha Mohta <[email protected]>
1 parent 19caf44 commit 169019f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

google/cloud/spanner_v1/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import pkg_resources
2020

21-
__version__ = pkg_resources.get_distribution("google-cloud-spanner").version
21+
__version__: str = pkg_resources.get_distribution("google-cloud-spanner").version
2222

2323
from .services.spanner import SpannerClient
2424
from .types.commit_response import CommitResponse

google/cloud/spanner_v1/instance.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import google.api_core.operation
1818
from google.api_core.exceptions import InvalidArgument
1919
import re
20+
import typing
2021

2122
from google.protobuf.empty_pb2 import Empty
2223
from google.protobuf.field_mask_pb2 import FieldMask
@@ -42,7 +43,7 @@
4243
DEFAULT_NODE_COUNT = 1
4344
PROCESSING_UNITS_PER_NODE = 1000
4445

45-
_OPERATION_METADATA_MESSAGES = (
46+
_OPERATION_METADATA_MESSAGES: typing.Tuple = (
4647
backup.Backup,
4748
backup.CreateBackupMetadata,
4849
backup.CopyBackupMetadata,

google/cloud/spanner_v1/snapshot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class _SnapshotBase(_SessionWrapper):
102102
"""
103103

104104
_multi_use = False
105-
_read_only = True
105+
_read_only: bool = True
106106
_transaction_id = None
107107
_read_request_count = 0
108108
_execute_sql_count = 0

0 commit comments

Comments
 (0)