From 6e597f2886ff0cd3a9027c434006af0f0895257b Mon Sep 17 00:00:00 2001 From: Raphael Long Date: Fri, 17 Jul 2020 11:34:14 -0500 Subject: [PATCH] fix: remove six dependency (#110) --- google/cloud/firestore_v1/async_document.py | 4 +--- google/cloud/firestore_v1/async_transaction.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/google/cloud/firestore_v1/async_document.py b/google/cloud/firestore_v1/async_document.py index 00672153c..dfcc5037b 100644 --- a/google/cloud/firestore_v1/async_document.py +++ b/google/cloud/firestore_v1/async_document.py @@ -14,8 +14,6 @@ """Classes for representing documents for the Google Cloud Firestore API.""" -import six - from google.cloud.firestore_v1.base_document import ( BaseDocumentReference, DocumentSnapshot, @@ -310,7 +308,7 @@ async def get(self, field_paths=None, transaction=None): :attr:`create_time` attributes will all be ``None`` and its :attr:`exists` attribute will be ``False``. """ - if isinstance(field_paths, six.string_types): + if isinstance(field_paths, str): raise ValueError("'field_paths' must be a sequence of paths, not a string.") if field_paths is not None: diff --git a/google/cloud/firestore_v1/async_transaction.py b/google/cloud/firestore_v1/async_transaction.py index 569025465..f572c173f 100644 --- a/google/cloud/firestore_v1/async_transaction.py +++ b/google/cloud/firestore_v1/async_transaction.py @@ -18,8 +18,6 @@ import asyncio import random -import six - from google.cloud.firestore_v1.base_transaction import ( _BaseTransactional, BaseTransaction, @@ -272,7 +270,7 @@ async def __call__(self, transaction, *args, **kwargs): """ self._reset() - for attempt in six.moves.xrange(transaction._max_attempts): + for attempt in range(transaction._max_attempts): result = await self._pre_commit(transaction, *args, **kwargs) succeeded = await self._maybe_commit(transaction) if succeeded: