Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
struan committed Jun 20, 2024
1 parent c6e1d4b commit 0932440
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 16 deletions.
1 change: 1 addition & 0 deletions ceuk-marking/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""

from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
Expand Down
2 changes: 1 addition & 1 deletion crowdsourcer/management/commands/import_national_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class Command(BaseCommand):
{"desc": "50% recycling rate", "score": 1},
{"desc": "60% recycling rate", "score": 2},
{"desc": "70% recycling rate", "score": 3},
]
],
# "options": [{"desc": "Criteria not met", "score": 0},]
},
{
Expand Down
6 changes: 3 additions & 3 deletions crowdsourcer/management/commands/send_council_signup_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def handle(self, *args, **kwargs):
form = PasswordResetForm({"email": user.email})
assert form.is_valid()
request = HttpRequest()
request.META[
"SERVER_NAME"
] = "marking.councilclimatescorecards.uk"
request.META["SERVER_NAME"] = (
"marking.councilclimatescorecards.uk"
)
request.META["SERVER_PORT"] = 443
form.save(
request=request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def handle(self, *args, **kwargs):
form = PasswordResetForm({"email": user.email})
assert form.is_valid()
request = HttpRequest()
request.META[
"SERVER_NAME"
] = "marking.councilclimatescorecards.uk"
request.META["SERVER_NAME"] = (
"marking.councilclimatescorecards.uk"
)
request.META["SERVER_PORT"] = 443
form.save(
request=request,
Expand Down
6 changes: 3 additions & 3 deletions crowdsourcer/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def process_template_response(self, request, response):
context["marking_session"] = request.current_session
context["sessions"] = MarkingSession.objects.filter(active=True)
context["brand"] = settings.BRAND
context[
"brand_include"
] = f"crowdsourcer/cobrand/navbar_{context['brand']}.html"
context["brand_include"] = (
f"crowdsourcer/cobrand/navbar_{context['brand']}.html"
)

response.context_data = context

Expand Down
6 changes: 3 additions & 3 deletions crowdsourcer/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ def get_context_data(self, **kwargs):
name=self.kwargs.get("name", "")
)
context["authority_name"] = self.kwargs.get("name", "")
context[
"page_title"
] = f"{self.title_start}{context['authority_name']}: {context['section_title']}"
context["page_title"] = (
f"{self.title_start}{context['authority_name']}: {context['section_title']}"
)
context["has_previous_questions"] = self.has_previous_questions

context["council_minutes"] = self.authority.get_data("council_minutes")
Expand Down
6 changes: 3 additions & 3 deletions crowdsourcer/views/marking.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ def get_context_data(self, **kwargs):

if self.request.current_session is None or self.request.current_stage is None:
if user.is_superuser:
context[
"setup_required"
] = "You need to add a marking session with a request type in the admin."
context["setup_required"] = (
"You need to add a marking session with a request type in the admin."
)
else:
context["setup_required"] = "This site is not set up yet."

Expand Down

0 comments on commit 0932440

Please sign in to comment.