Skip to content

Commit 7d3f841

Browse files
committed
style: run black with upgraded version
1 parent f9b04ec commit 7d3f841

File tree

7 files changed

+3
-8
lines changed

7 files changed

+3
-8
lines changed

mezzanine/accounts/forms.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class Meta:
3131
model = get_profile_model()
3232
exclude = (get_profile_user_fieldname(),) + _exclude_fields
3333

34-
3534
except ProfileNotConfigured:
3635
pass
3736

mezzanine/core/admin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ class Media:
4747
"all": (static("mezzanine/css/admin/tabbed_translation_fields.css"),),
4848
}
4949

50-
5150
else:
5251

5352
class BaseTranslationModelAdmin(admin.ModelAdmin):

mezzanine/core/fields.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ def __init__(self, *args, **kwargs):
112112
kwargs.pop(fb_arg, None)
113113
super().__init__(*args, **kwargs)
114114

115-
116115
else:
117116

118117
class FileField(FileBrowseField):

mezzanine/core/managers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def annotate_scores(self):
247247
if result.publish_date:
248248
age = (now() - result.publish_date).total_seconds()
249249
if age > 0:
250-
count = count / age ** settings.SEARCH_AGE_SCALE_FACTOR
250+
count = count / age**settings.SEARCH_AGE_SCALE_FACTOR
251251

252252
results[i].result_count = count
253253
return iter(results)

mezzanine/core/templatetags/mezzanine_tags.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def compress(parser, token):
5252

5353
return compress(parser, token)
5454

55-
5655
else:
5756

5857
@register.to_end_tag

mezzanine/utils/html.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
class HTMLParseError(Exception):
1010
pass
1111

12-
1312
except ImportError: # Python 2
1413
from HTMLParser import HTMLParser, HTMLParseError
1514
from htmlentitydefs import name2codepoint

tests/test_core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,14 +309,14 @@ def test_static_proxy_with_static_url_with_full_host(self):
309309

310310
def _get_csrftoken(self, response):
311311
csrf = re.findall(
312-
br'<input type="hidden" name="csrfmiddlewaretoken" ' br'value="([^"]+)">',
312+
rb'<input type="hidden" name="csrfmiddlewaretoken" ' rb'value="([^"]+)">',
313313
response.content,
314314
)
315315
self.assertEqual(len(csrf), 1, "No csrfmiddlewaretoken found!")
316316
return csrf[0]
317317

318318
def _get_formurl(self, response):
319-
action = re.findall(br'<form action="([^"]*)" method="post">', response.content)
319+
action = re.findall(rb'<form action="([^"]*)" method="post">', response.content)
320320
self.assertEqual(len(action), 1, "No form with action found!")
321321
if action[0] == b"":
322322
action = response.request["PATH_INFO"]

0 commit comments

Comments
 (0)