Skip to content

Commit 6aff106

Browse files
committed
ruff format
1 parent 0d3dd58 commit 6aff106

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

RATapi/inputs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ def check_indices(problem: ProblemDefinition) -> None:
445445
if elements:
446446
raise IndexError(
447447
f'The problem field "{index_list[params]}" contains: {", ".join(str(i) for i in elements)}'
448-
f', which lie{"s"*(len(elements)==1)} outside of the range of "{params}"',
448+
f', which lie{"s" * (len(elements) == 1)} outside of the range of "{params}"',
449449
)
450450

451451
# backgroundParams has a different structure, so is handled separately:
@@ -478,8 +478,8 @@ def check_indices(problem: ProblemDefinition) -> None:
478478
elements = [element for element in background_data[1:] if not 0 < element <= len(problem.backgroundParams)]
479479
if elements:
480480
raise IndexError(
481-
f'Entry {i} of contrastBackgroundParams contains: {", ".join(str(i) for i in elements)}'
482-
f', which lie{"s"*(len(elements)==1)} outside of the range of "backgroundParams"',
481+
f"Entry {i} of contrastBackgroundParams contains: {', '.join(str(i) for i in elements)}"
482+
f', which lie{"s" * (len(elements) == 1)} outside of the range of "backgroundParams"',
483483
)
484484

485485

tests/test_inputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ def test_background_params_value_indices(self, test_problem, bad_value, request)
647647

648648
with pytest.raises(
649649
IndexError,
650-
match=f"Entry {len(bad_value)-1} of contrastBackgroundParams contains: {bad_value[-1][-1]}"
650+
match=f"Entry {len(bad_value) - 1} of contrastBackgroundParams contains: {bad_value[-1][-1]}"
651651
f', which lies outside of the range of "backgroundParams"',
652652
):
653653
check_indices(test_problem)

0 commit comments

Comments
 (0)