Skip to content

Commit 2d286bb

Browse files
committed
fixed mypy
1 parent a8beea4 commit 2d286bb

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

google/cloud/firestore_v1/base_pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,6 @@ def _execute_response_helper(
105105
doc.fields,
106106
ref,
107107
response._pb.execution_time,
108-
doc.create_time.timestamp_pb() if doc.create_time else None,
109-
doc.update_time.timestamp_pb() if doc.update_time else None,
108+
doc._pb.create_time if doc.create_time else None,
109+
doc._pb.update_time if doc.update_time else None,
110110
)

google/cloud/firestore_v1/field_path.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from __future__ import annotations
1717
import re
1818
from collections import abc
19-
from typing import Iterable, cast
19+
from typing import Any, Iterable, cast, MutableMapping
2020

2121
_FIELD_PATH_MISSING_TOP = "{!r} is not contained in the data"
2222
_FIELD_PATH_MISSING_KEY = "{!r} is not contained in the data for the key {!r}"
@@ -170,7 +170,7 @@ def render_field_path(field_names: Iterable[str]):
170170
get_field_path = render_field_path # backward-compatibility
171171

172172

173-
def get_nested_value(field_path: str, data: dict):
173+
def get_nested_value(field_path: str, data: MutableMapping[str, Any]):
174174
"""Get a (potentially nested) value from a dictionary.
175175
176176
If the data is nested, for example:

google/cloud/firestore_v1/pipeline_result.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
from __future__ import annotations
16-
from typing import Any, TYPE_CHECKING
16+
from typing import Any, MutableMapping, TYPE_CHECKING
1717
from google.cloud.firestore_v1 import _helpers
1818
from google.cloud.firestore_v1.field_path import get_nested_value
1919
from google.cloud.firestore_v1.field_path import FieldPath
@@ -36,7 +36,7 @@ class PipelineResult:
3636
def __init__(
3737
self,
3838
client: BaseClient,
39-
fields_pb: dict[str, ValueProto],
39+
fields_pb: MutableMapping[str, ValueProto],
4040
ref: BaseDocumentReference | None = None,
4141
execution_time: Timestamp | None = None,
4242
create_time: Timestamp | None = None,

0 commit comments

Comments
 (0)