reformat with latest black

This commit is contained in:
Bastien Gérard
2020-01-07 21:44:04 +01:00
parent 84f3dce492
commit e64a7a9448
3 changed files with 5 additions and 3 deletions

View File

@@ -11,7 +11,9 @@ PYMONGO_VERSION = tuple(pymongo.version_tuple[:2])
IS_PYMONGO_GTE_37 = PYMONGO_VERSION >= _PYMONGO_37
def count_documents(collection, filter, skip=None, limit=None, hint=None, collation=None):
def count_documents(
collection, filter, skip=None, limit=None, hint=None, collation=None
):
"""Pymongo>3.7 deprecates count in favour of count_documents
"""
if limit == 0:

View File

@@ -404,7 +404,7 @@ class BaseQuerySet(object):
if self._limit == 0:
# mimic the fact that historically .limit(0) sets no limit
kwargs.pop('limit', None)
kwargs.pop("limit", None)
if self._hint not in (-1, None):
kwargs["hint"] = self._hint