Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
Re-run black
Browse files Browse the repository at this point in the history
  • Loading branch information
callahad committed Feb 10, 2020
1 parent 36edbab commit 987b0f8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
4 changes: 1 addition & 3 deletions kuma/health/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,7 @@ def csp_violation_capture(request):
return HttpResponse()

data = client.get_data_from_request(request)
data.update(
{"level": logging.INFO, "logger": "CSP"}
)
data.update({"level": logging.INFO, "logger": "CSP"})
try:
csp_data = json.loads(request.body)
except ValueError:
Expand Down
1 change: 1 addition & 0 deletions kuma/users/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@

from .forms import UserBanForm, UserDeleteForm, UserEditForm, UserRecoveryEmailForm
from .models import User, UserBan

# we have to import the signup form here due to allauth's odd form subclassing
# that requires providing a base form class (see ACCOUNT_SIGNUP_FORM_CLASS)
from .signup import SignupForm
Expand Down
12 changes: 3 additions & 9 deletions kuma/wiki/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1258,9 +1258,7 @@ def test_review_tags(self, get_current):
assert review_tags == ["technical"]

# Now, post an update with two tags
data.update(
{"form-type": "rev", "review_tags": ["editorial", "technical"]}
)
data.update({"form-type": "rev", "review_tags": ["editorial", "technical"]})
response = self.client.post(
reverse("wiki.edit", args=[doc.slug]), data, HTTP_HOST=settings.WIKI_HOST
)
Expand Down Expand Up @@ -2928,9 +2926,7 @@ def test_schedule_rendering(
self.client.login(username="testuser", password="testpass")

data = new_document_data()
data.update(
{"form-type": "rev", "content": "This is an update"}
)
data.update({"form-type": "rev", "content": "This is an update"})

edit_url = reverse("wiki.edit", args=[self.doc.slug])
resp = self.client.post(edit_url, data, HTTP_HOST=settings.WIKI_HOST)
Expand All @@ -2939,9 +2935,7 @@ def test_schedule_rendering(

mock_document_schedule_rendering.reset_mock()

data.update(
{"form-type": "both", "content": "This is a translation"}
)
data.update({"form-type": "both", "content": "This is a translation"})
translate_url = reverse("wiki.translate", args=[data["slug"]]) + "?tolocale=fr"
response = self.client.post(translate_url, data, HTTP_HOST=settings.WIKI_HOST)
assert response.status_code == 302
Expand Down
4 changes: 1 addition & 3 deletions kuma/wiki/views/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ def create(request):
else:
doc_form.data["slug"] = posted_slug

context.update(
{"document_form": doc_form, "revision_form": rev_form}
)
context.update({"document_form": doc_form, "revision_form": rev_form})

return render(request, "wiki/create.html", context)

0 comments on commit 987b0f8

Please sign in to comment.