fix recent update not aligned with latest black

This commit is contained in:
Bastien Gerard
2020-12-13 00:16:10 +01:00
parent bf12621ce9
commit 149fb953e7
4 changed files with 11 additions and 23 deletions

View File

@@ -281,8 +281,7 @@ class BaseQuerySet:
)
def create(self, **kwargs):
"""Create new object. Returns the saved object instance.
"""
"""Create new object. Returns the saved object instance."""
return self._document(**kwargs).save(force_insert=True)
def first(self):
@@ -1579,8 +1578,7 @@ class BaseQuerySet:
return doc
def rewind(self):
"""Rewind the cursor to its unevaluated state.
"""
"""Rewind the cursor to its unevaluated state."""
self._iter = False
self._cursor.rewind()

View File

@@ -150,8 +150,7 @@ class QuerySet(BaseQuerySet):
return self._len
def no_cache(self):
"""Convert to a non-caching queryset
"""
"""Convert to a non-caching queryset"""
if self._result_cache is not None:
raise OperationError("QuerySet already cached")
@@ -162,13 +161,11 @@ class QuerySetNoCache(BaseQuerySet):
"""A non caching QuerySet"""
def cache(self):
"""Convert to a caching queryset
"""
"""Convert to a caching queryset"""
return self._clone_into(QuerySet(self._document, self._collection))
def __repr__(self):
"""Provides the string representation of the QuerySet
"""
"""Provides the string representation of the QuerySet"""
if self._iter:
return ".. queryset mid-iteration .."