Skip to content

Commit 149fb95

Browse files
committed
fix recent update not aligned with latest black
1 parent bf12621 commit 149fb95

File tree

4 files changed

+11
-23
lines changed

4 files changed

+11
-23
lines changed

mongoengine/base/fields.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,7 @@ def validate(self, value):
514514

515515

516516
class GeoJsonBaseField(BaseField):
517-
"""A geo json field storing a geojson style object.
518-
"""
517+
"""A geo json field storing a geojson style object."""
519518

520519
_geo_index = pymongo.GEOSPHERE
521520
_type = "GeoBase"

mongoengine/fields.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,7 @@ def validate(self, value):
197197

198198

199199
class EmailField(StringField):
200-
"""A field that validates input as an email address.
201-
202-
"""
200+
"""A field that validates input as an email address."""
203201

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

13001298

13011299
class CachedReferenceField(BaseField):
1302-
"""A referencefield with cache fields to purpose pseudo-joins
1303-
"""
1300+
"""A referencefield with cache fields to purpose pseudo-joins"""
13041301

13051302
def __init__(self, document_type, fields=None, auto_sync=True, **kwargs):
13061303
"""Initialises the Cached Reference Field.
@@ -1680,8 +1677,7 @@ class GridFSError(Exception):
16801677

16811678

16821679
class GridFSProxy:
1683-
"""Proxy object to handle writing and reading of files to and from GridFS
1684-
"""
1680+
"""Proxy object to handle writing and reading of files to and from GridFS"""
16851681

16861682
_fs = None
16871683

@@ -1843,8 +1839,7 @@ def _mark_as_changed(self):
18431839

18441840

18451841
class FileField(BaseField):
1846-
"""A GridFS storage field.
1847-
"""
1842+
"""A GridFS storage field."""
18481843

18491844
proxy_class = GridFSProxy
18501845

@@ -2219,8 +2214,7 @@ def to_python(self, value):
22192214

22202215

22212216
class UUIDField(BaseField):
2222-
"""A UUID field.
2223-
"""
2217+
"""A UUID field."""
22242218

22252219
_binary = None
22262220

mongoengine/queryset/base.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,7 @@ def get(self, *q_objs, **query):
281281
)
282282

283283
def create(self, **kwargs):
284-
"""Create new object. Returns the saved object instance.
285-
"""
284+
"""Create new object. Returns the saved object instance."""
286285
return self._document(**kwargs).save(force_insert=True)
287286

288287
def first(self):
@@ -1579,8 +1578,7 @@ def __next__(self):
15791578
return doc
15801579

15811580
def rewind(self):
1582-
"""Rewind the cursor to its unevaluated state.
1583-
"""
1581+
"""Rewind the cursor to its unevaluated state."""
15841582
self._iter = False
15851583
self._cursor.rewind()
15861584

mongoengine/queryset/queryset.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ def count(self, with_limit_and_skip=False):
150150
return self._len
151151

152152
def no_cache(self):
153-
"""Convert to a non-caching queryset
154-
"""
153+
"""Convert to a non-caching queryset"""
155154
if self._result_cache is not None:
156155
raise OperationError("QuerySet already cached")
157156

@@ -162,13 +161,11 @@ class QuerySetNoCache(BaseQuerySet):
162161
"""A non caching QuerySet"""
163162

164163
def cache(self):
165-
"""Convert to a caching queryset
166-
"""
164+
"""Convert to a caching queryset"""
167165
return self._clone_into(QuerySet(self._document, self._collection))
168166

169167
def __repr__(self):
170-
"""Provides the string representation of the QuerySet
171-
"""
168+
"""Provides the string representation of the QuerySet"""
172169
if self._iter:
173170
return ".. queryset mid-iteration .."
174171

0 commit comments

Comments
 (0)