Skip to content

Commit 92a91f8

Browse files
Python: ABC and typing are not interchangeable
1 parent 3f90057 commit 92a91f8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/typedb/driver.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
from collections.abc import Iterable, Mapping
19-
from typing import Union
18+
from collections.abc import Mapping as ABCMapping
19+
from typing import Iterable, Mapping, Union
2020

2121
from typedb.api.answer.concept_map import * # noqa # pylint: disable=unused-import
2222
from typedb.api.answer.concept_map_group import * # noqa # pylint: disable=unused-import
@@ -78,7 +78,7 @@ def cloud_driver(addresses: Union[Mapping[str, str], Iterable[str], str], creden
7878
"""
7979
if isinstance(addresses, str):
8080
return _Driver([addresses], credential)
81-
elif isinstance(addresses, Mapping):
81+
elif isinstance(addresses, ABCMapping):
8282
return _Driver(dict(addresses), credential)
8383
else:
8484
return _Driver(list(addresses), credential)

0 commit comments

Comments
 (0)