Skip to content

Commit 33bf841

Browse files
chore: remove collection import (#186)
Fixes #183
1 parent 3011481 commit 33bf841

File tree

1 file changed

+2
-5
lines changed
  • packages/google-cloud-firestore/google/cloud/firestore_v1

1 file changed

+2
-5
lines changed

packages/google-cloud-firestore/google/cloud/firestore_v1/field_path.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414

1515
"""Utilities for managing / converting field paths to / from strings."""
1616

17-
try:
18-
from collections import abc as collections_abc
19-
except ImportError: # Python 2.7
20-
import collections as collections_abc
17+
from collections import abc
2118

2219
import re
2320

@@ -232,7 +229,7 @@ def get_nested_value(field_path, data):
232229

233230
nested_data = data
234231
for index, field_name in enumerate(field_names):
235-
if isinstance(nested_data, collections_abc.Mapping):
232+
if isinstance(nested_data, abc.Mapping):
236233
if field_name in nested_data:
237234
nested_data = nested_data[field_name]
238235
else:

0 commit comments

Comments
 (0)