Skip to content

Commit

Permalink
fix recent update not aligned with latest black
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-bagerard committed Dec 12, 2020
1 parent bf12621 commit 149fb95
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 23 deletions.
3 changes: 1 addition & 2 deletions mongoengine/base/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,7 @@ def validate(self, value):


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
_type = "GeoBase"
Expand Down
16 changes: 5 additions & 11 deletions mongoengine/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,7 @@ def validate(self, value):


class EmailField(StringField):
"""A field that validates input as an email address.
"""
"""A field that validates input as an email address."""

USER_REGEX = LazyRegexCompiler(
# `dot-atom` defined in RFC 5322 Section 3.2.3.
Expand Down Expand Up @@ -1299,8 +1297,7 @@ def lookup_member(self, member_name):


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):
"""Initialises the Cached Reference Field.
Expand Down Expand Up @@ -1680,8 +1677,7 @@ class GridFSError(Exception):


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

Expand Down Expand Up @@ -1843,8 +1839,7 @@ def _mark_as_changed(self):


class FileField(BaseField):
"""A GridFS storage field.
"""
"""A GridFS storage field."""

proxy_class = GridFSProxy

Expand Down Expand Up @@ -2219,8 +2214,7 @@ def to_python(self, value):


class UUIDField(BaseField):
"""A UUID field.
"""
"""A UUID field."""

_binary = None

Expand Down
6 changes: 2 additions & 4 deletions mongoengine/queryset/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,7 @@ def get(self, *q_objs, **query):
)

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):
Expand Down Expand Up @@ -1579,8 +1578,7 @@ def __next__(self):
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()

Expand Down
9 changes: 3 additions & 6 deletions mongoengine/queryset/queryset.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ def count(self, with_limit_and_skip=False):
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")

Expand All @@ -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 .."

Expand Down

0 comments on commit 149fb95

Please sign in to comment.