Skip to content

Commit ceca142

Browse files
committed
eli-366 addressing ruff failures with updated version of ruff
1 parent 2ac0f91 commit ceca142

File tree

7 files changed

+28
-30
lines changed

7 files changed

+28
-30
lines changed

poetry.lock

Lines changed: 21 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ botocore = "^1.40.57"
3737
aws-xray-sdk = "2.15.0"
3838

3939
[tool.poetry.group.dev.dependencies]
40-
ruff = "^0.11.13"
40+
ruff = "^0.14.10"
4141
docopt = "^0.6.2"
4242
jsonpath-rw = "^1.4.0"
4343
semver = "^3.0.4"

src/eligibility_signposting_api/services/calculators/eligibility_calculator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def get_best_iteration_result(self, campaign_group: list[CampaignConfig]) -> Bes
129129
if not iteration_results:
130130
return None
131131

132-
(best_iteration_name, best_iteration_result) = max(
132+
(_best_iteration_name, best_iteration_result) = max(
133133
iteration_results.items(),
134134
key=lambda item: next(iter(item[1].cohort_results.values())).status.value
135135
# Below handles the case where there are no cohort results

tests/integration/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def iam_role(iam_client: BaseClient) -> Generator[str]:
228228

229229
@pytest.fixture(scope="session")
230230
def lambda_zip() -> Path:
231-
build_result = subprocess.run(["make", "build"], capture_output=True, text=True, check=False) # Noqa: S603, S607
231+
build_result = subprocess.run(["make", "build"], capture_output=True, text=True, check=False) # noqa: S603, S607
232232
assert build_result.returncode == 0, f"'make build' failed: {build_result.stderr}"
233233
return Path("dist/lambda.zip")
234234

tests/unit/services/calculators/test_eligibility_calculator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,7 @@ def test_eligibility_status_with_invalid_tokens_raises_attribute_error(faker: Fa
14361436

14371437
calculator = EligibilityCalculator(person_rows, campaign_configs)
14381438

1439-
with pytest.raises(ValueError, match="Invalid token."):
1439+
with pytest.raises(ValueError, match=r"Invalid token\."):
14401440
calculator.get_eligibility_status("Y", ["ALL"], "ALL")
14411441

14421442

tests/unit/services/processors/test_token_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_parse_valid_tokens(self, token, expected_level, expected_name, expected
3838
],
3939
)
4040
def test_parse_invalid_tokens_raises_error(self, token):
41-
with pytest.raises(ValueError, match="Invalid token."):
41+
with pytest.raises(ValueError, match=r"Invalid token\."):
4242
TokenParser.parse(token)
4343

4444
@pytest.mark.parametrize(
@@ -53,5 +53,5 @@ def test_parse_invalid_tokens_raises_error(self, token):
5353
],
5454
)
5555
def test_parse_invalid_token_format_raises_error(self, token):
56-
with pytest.raises(ValueError, match="Invalid token format."):
56+
with pytest.raises(ValueError, match=r"Invalid token format\."):
5757
TokenParser.parse(token)

tests/unit/services/processors/test_token_processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ def test_valid_token_invalid_format_should_raise_error(self, token_format: str):
351351
actions=[],
352352
)
353353

354-
with pytest.raises(ValueError, match="Invalid token format."):
354+
with pytest.raises(ValueError, match=r"Invalid token format\."):
355355
TokenProcessor.find_and_replace_tokens(person, condition)
356356

357357
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)