Skip to content

Commit 8e8942f

Browse files
committed
Fix code formatting issues
1 parent f350711 commit 8e8942f

8 files changed

Lines changed: 16 additions & 16 deletions

File tree

lung_cancer_screening/core/tests/acceptance/helpers/user_interaction_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ def fill_in_and_submit_weight(page, kilograms):
4343

4444
page.get_by_label("Kilograms").fill(str(kilograms))
4545

46-
page.click("text=Continue")
46+
page.click("text=Continue")

lung_cancer_screening/core/tests/acceptance/test_questionnaire_validation_errors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ def test_weight_validation_errors(self):
9191
page.goto(f"{self.live_server_url}/start")
9292
fill_in_and_submit_participant_id(page, participant_id)
9393
page.goto(f"{self.live_server_url}/weight")
94-
94+
9595
page.click("text=Continue")
9696
expect(page.locator(".nhsuk-error-message")).to_contain_text(
9797
"Enter your weight."
9898
)
99-
# Test weight below minimum
99+
# Test weight below minimum
100100
page.get_by_label("Kilograms").fill('25.3')
101101
page.click('text=Continue')
102102
expect(page.locator(".nhsuk-error-message")).to_contain_text(
103103
"Weight must be between 25.4kg and 317.5kg"
104-
)
104+
)

lung_cancer_screening/questions/forms/metric_weight_form.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ def __init__(self, *args, **kwargs):
2020
)
2121

2222
class Meta:
23-
model = ResponseSet
24-
fields = ['weight_metric']
23+
model = ResponseSet
24+
fields = ['weight_metric']

lung_cancer_screening/questions/jinja2/weight.jinja

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
{{ csrf_input }}
2020
<h1 class="nhsuk-heading-l">Enter your weight</h1>
2121

22-
<p>An accurate measurement is important.
23-
22+
<p>An accurate measurement is important.
23+
2424
<p>If you have digital scales, use these to check your weight. Some pharmacies and gyms have scales where you can check for free.
2525

2626
{% call fieldset({
@@ -40,4 +40,4 @@
4040
</form>
4141
</div>
4242
</div>
43-
{% endblock %}
43+
{% endblock %}

lung_cancer_screening/questions/tests/unit/forms/test_metric_weight_form.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ def test_is_not_valid_without_any_weight_value_set(self):
4040
}
4141
)
4242
self.assertFalse(form.is_valid())
43-
self.assertEqual(form.errors, {"weight_metric": ["Enter your weight."]})
43+
self.assertEqual(form.errors, {"weight_metric": ["Enter your weight."]})

lung_cancer_screening/questions/tests/unit/models/test_response_set.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def test_formatted_height_returns_imperial_height_if_set(self):
178178
self.response_set.formatted_height,
179179
"5 feet 8 inches"
180180
)
181-
181+
182182
def test_is_invalid_if_weight_metric_is_below_lower_bound(self):
183183
self.response_set.weight_metric = ResponseSet.MIN_WEIGHT_METRIC - 1
184184

lung_cancer_screening/questions/tests/unit/views/test_weight.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_get_redirects_if_the_participant_does_not_exist(self):
2727
)
2828

2929
self.assertRedirects(response, reverse("questions:start"))
30-
30+
3131
def test_get_redirects_if_the_participant_is_none(self):
3232
self.session.flush()
3333

lung_cancer_screening/questions/views/weight.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
def weight(request):
99
if request.method == "POST":
1010
form=MetricWeightForm(
11-
instance=request.participant.responseset_set.last(),
12-
data=request.POST,
13-
participant=request.participant
11+
instance=request.participant.responseset_set.last(),
12+
data=request.POST,
13+
participant=request.participant
1414
)
1515
if form.is_valid():
1616
form.save()
@@ -30,4 +30,4 @@ def weight(request):
3030
{
3131
"form": MetricWeightForm(participant=request.participant)
3232
}
33-
)
33+
)

0 commit comments

Comments
 (0)