Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: drop six dependency #110

Merged
merged 1 commit into from Jul 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions google/cloud/firestore_v1/async_document.py
Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions google/cloud/firestore_v1/async_transaction.py
Expand Up @@ -18,8 +18,6 @@
import asyncio
import random

import six

from google.cloud.firestore_v1.base_transaction import (
_BaseTransactional,
BaseTransaction,
Expand Down Expand Up @@ -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:
Expand Down