Skip to content

Commit 04c7827

Browse files
committed
Update *.py files after new black version installation
1 parent c940ccc commit 04c7827

File tree

7 files changed

+3
-14
lines changed

7 files changed

+3
-14
lines changed

flask_mongoengine/pagination.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
class Pagination(object):
1111
def __init__(self, iterable, page, per_page):
12-
1312
if page < 1:
1413
abort(404)
1514

flask_mongoengine/wtf/fields.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ def __init__(
144144
blank_text="---",
145145
**kwargs,
146146
):
147-
148147
super(QuerySetSelectMultipleField, self).__init__(
149148
label, validators, queryset, label_attr, allow_blank, blank_text, **kwargs
150149
)

tests/test_db_fields.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ def test__get_fields_names__is_called_by_to_wtf_form_call(
7070
def test__get_fields_names__hold_correct_fields_ordering_for_only(
7171
self, TempDocument
7272
):
73-
7473
field_names = TempDocument._get_fields_names(
7574
only=["field_five", "field_one"], exclude=None
7675
)

tests/test_forms.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616

1717
def test_binaryfield(app, db):
18-
1918
with app.test_request_context("/"):
2019

2120
class Binary(db.Document):
@@ -28,9 +27,7 @@ class Binary(db.Document):
2827

2928

3029
def test_choices_coerce(app, db):
31-
3230
with app.test_request_context("/"):
33-
3431
CHOICES = ((1, "blue"), (2, "red"))
3532

3633
class MyChoices(db.Document):
@@ -44,9 +41,7 @@ class MyChoices(db.Document):
4441

4542

4643
def test_list_choices_coerce(app, db):
47-
4844
with app.test_request_context("/"):
49-
5045
CHOICES = ((1, "blue"), (2, "red"))
5146

5247
class MyChoices(db.Document):
@@ -60,7 +55,6 @@ class MyChoices(db.Document):
6055

6156

6257
def test_emailfield(app, db):
63-
6458
with app.test_request_context("/"):
6559

6660
class Email(db.Document):
@@ -343,7 +337,6 @@ class DogOwner(db.Document):
343337

344338
def test_modelradiofield(app, db):
345339
with app.test_request_context("/"):
346-
347340
choices = [("male", "Male"), ("female", "Female"), ("other", "Other")]
348341

349342
class Poll(db.Document):
@@ -383,7 +376,6 @@ class User(db.Document):
383376

384377

385378
def test_unique_with(app, db):
386-
387379
with app.test_request_context("/"):
388380

389381
class Item(db.Document):

tests/test_json.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,14 @@ class DummyEncoder(flask.json.JSONEncoder):
4949
"""
5050

5151

52-
DummyProvider = None
5352
if use_json_provider():
5453

5554
class DummyProvider(flask.json.provider.DefaultJSONProvider):
5655
"""Dummy Provider, to test correct MRO in new flask versions."""
5756

57+
else:
58+
DummyProvider = None
59+
5860

5961
@pytest.mark.skipif(condition=use_json_provider(), reason="New flask use other test")
6062
@pytest.mark.usefixtures("extended_db")

tests/test_pagination.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def _test_paginator(paginator):
6565
assert [1, 2, 3, 4, 5] == list(paginator.iter_pages())
6666

6767
for i in [1, 2, 3, 4, 5]:
68-
6968
if i == 1:
7069
assert not paginator.has_prev
7170
with pytest.raises(NotFound):

tests/test_session.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
@pytest.fixture(autouse=True)
99
def setup_endpoints(app, db):
10-
1110
app.session_interface = MongoEngineSessionInterface(db)
1211

1312
@app.route("/")

0 commit comments

Comments
 (0)