Skip to content

Commit

Permalink
style: run black with upgraded version
Browse files Browse the repository at this point in the history
  • Loading branch information
henri-hulski committed Apr 8, 2022
1 parent f9b04ec commit 7d3f841
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion mezzanine/accounts/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class Meta:
model = get_profile_model()
exclude = (get_profile_user_fieldname(),) + _exclude_fields


except ProfileNotConfigured:
pass

Expand Down
1 change: 0 additions & 1 deletion mezzanine/core/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class Media:
"all": (static("mezzanine/css/admin/tabbed_translation_fields.css"),),
}


else:

class BaseTranslationModelAdmin(admin.ModelAdmin):
Expand Down
1 change: 0 additions & 1 deletion mezzanine/core/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ def __init__(self, *args, **kwargs):
kwargs.pop(fb_arg, None)
super().__init__(*args, **kwargs)


else:

class FileField(FileBrowseField):
Expand Down
2 changes: 1 addition & 1 deletion mezzanine/core/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def annotate_scores(self):
if result.publish_date:
age = (now() - result.publish_date).total_seconds()
if age > 0:
count = count / age ** settings.SEARCH_AGE_SCALE_FACTOR
count = count / age**settings.SEARCH_AGE_SCALE_FACTOR

results[i].result_count = count
return iter(results)
Expand Down
1 change: 0 additions & 1 deletion mezzanine/core/templatetags/mezzanine_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def compress(parser, token):

return compress(parser, token)


else:

@register.to_end_tag
Expand Down
1 change: 0 additions & 1 deletion mezzanine/utils/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
class HTMLParseError(Exception):
pass


except ImportError: # Python 2
from HTMLParser import HTMLParser, HTMLParseError
from htmlentitydefs import name2codepoint
Expand Down
4 changes: 2 additions & 2 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,14 +309,14 @@ def test_static_proxy_with_static_url_with_full_host(self):

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

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

0 comments on commit 7d3f841

Please sign in to comment.