fix recent update not aligned with latest black
This commit is contained in:
parent
bf12621ce9
commit
149fb953e7
@ -514,8 +514,7 @@ class ObjectIdField(BaseField):
|
|||||||
|
|
||||||
|
|
||||||
class GeoJsonBaseField(BaseField):
|
class GeoJsonBaseField(BaseField):
|
||||||
"""A geo json field storing a geojson style object.
|
"""A geo json field storing a geojson style object."""
|
||||||
"""
|
|
||||||
|
|
||||||
_geo_index = pymongo.GEOSPHERE
|
_geo_index = pymongo.GEOSPHERE
|
||||||
_type = "GeoBase"
|
_type = "GeoBase"
|
||||||
|
@ -197,9 +197,7 @@ class URLField(StringField):
|
|||||||
|
|
||||||
|
|
||||||
class EmailField(StringField):
|
class EmailField(StringField):
|
||||||
"""A field that validates input as an email address.
|
"""A field that validates input as an email address."""
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
USER_REGEX = LazyRegexCompiler(
|
USER_REGEX = LazyRegexCompiler(
|
||||||
# `dot-atom` defined in RFC 5322 Section 3.2.3.
|
# `dot-atom` defined in RFC 5322 Section 3.2.3.
|
||||||
@ -1299,8 +1297,7 @@ class ReferenceField(BaseField):
|
|||||||
|
|
||||||
|
|
||||||
class CachedReferenceField(BaseField):
|
class CachedReferenceField(BaseField):
|
||||||
"""A referencefield with cache fields to purpose pseudo-joins
|
"""A referencefield with cache fields to purpose pseudo-joins"""
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(self, document_type, fields=None, auto_sync=True, **kwargs):
|
def __init__(self, document_type, fields=None, auto_sync=True, **kwargs):
|
||||||
"""Initialises the Cached Reference Field.
|
"""Initialises the Cached Reference Field.
|
||||||
@ -1680,8 +1677,7 @@ class GridFSError(Exception):
|
|||||||
|
|
||||||
|
|
||||||
class GridFSProxy:
|
class GridFSProxy:
|
||||||
"""Proxy object to handle writing and reading of files to and from GridFS
|
"""Proxy object to handle writing and reading of files to and from GridFS"""
|
||||||
"""
|
|
||||||
|
|
||||||
_fs = None
|
_fs = None
|
||||||
|
|
||||||
@ -1843,8 +1839,7 @@ class GridFSProxy:
|
|||||||
|
|
||||||
|
|
||||||
class FileField(BaseField):
|
class FileField(BaseField):
|
||||||
"""A GridFS storage field.
|
"""A GridFS storage field."""
|
||||||
"""
|
|
||||||
|
|
||||||
proxy_class = GridFSProxy
|
proxy_class = GridFSProxy
|
||||||
|
|
||||||
@ -2219,8 +2214,7 @@ class SequenceField(BaseField):
|
|||||||
|
|
||||||
|
|
||||||
class UUIDField(BaseField):
|
class UUIDField(BaseField):
|
||||||
"""A UUID field.
|
"""A UUID field."""
|
||||||
"""
|
|
||||||
|
|
||||||
_binary = None
|
_binary = None
|
||||||
|
|
||||||
|
@ -281,8 +281,7 @@ class BaseQuerySet:
|
|||||||
)
|
)
|
||||||
|
|
||||||
def create(self, **kwargs):
|
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)
|
return self._document(**kwargs).save(force_insert=True)
|
||||||
|
|
||||||
def first(self):
|
def first(self):
|
||||||
@ -1579,8 +1578,7 @@ class BaseQuerySet:
|
|||||||
return doc
|
return doc
|
||||||
|
|
||||||
def rewind(self):
|
def rewind(self):
|
||||||
"""Rewind the cursor to its unevaluated state.
|
"""Rewind the cursor to its unevaluated state."""
|
||||||
"""
|
|
||||||
self._iter = False
|
self._iter = False
|
||||||
self._cursor.rewind()
|
self._cursor.rewind()
|
||||||
|
|
||||||
|
@ -150,8 +150,7 @@ class QuerySet(BaseQuerySet):
|
|||||||
return self._len
|
return self._len
|
||||||
|
|
||||||
def no_cache(self):
|
def no_cache(self):
|
||||||
"""Convert to a non-caching queryset
|
"""Convert to a non-caching queryset"""
|
||||||
"""
|
|
||||||
if self._result_cache is not None:
|
if self._result_cache is not None:
|
||||||
raise OperationError("QuerySet already cached")
|
raise OperationError("QuerySet already cached")
|
||||||
|
|
||||||
@ -162,13 +161,11 @@ class QuerySetNoCache(BaseQuerySet):
|
|||||||
"""A non caching QuerySet"""
|
"""A non caching QuerySet"""
|
||||||
|
|
||||||
def cache(self):
|
def cache(self):
|
||||||
"""Convert to a caching queryset
|
"""Convert to a caching queryset"""
|
||||||
"""
|
|
||||||
return self._clone_into(QuerySet(self._document, self._collection))
|
return self._clone_into(QuerySet(self._document, self._collection))
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
"""Provides the string representation of the QuerySet
|
"""Provides the string representation of the QuerySet"""
|
||||||
"""
|
|
||||||
if self._iter:
|
if self._iter:
|
||||||
return ".. queryset mid-iteration .."
|
return ".. queryset mid-iteration .."
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user