Skip to content

Commit

Permalink
Upgrade Ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
jond01 committed Jan 29, 2025
1 parent 4a606bd commit cfe06bf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
rev: v0.9.3
hooks:
- id: ruff
args: [--fix]
Expand Down
6 changes: 3 additions & 3 deletions tests/test_boi_banks_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ def fixture_boi_banks() -> set[str]:
@pytest.mark.live
def test_boi_banks(boi_banks: set[str]) -> None:
"""Test the online set vs. the hard-coded one"""
assert (
boi_banks == KNOWN_BANKS
), "Mismatch between the updated banks list data from BOI and the saved data"
assert boi_banks == KNOWN_BANKS, (
"Mismatch between the updated banks list data from BOI and the saved data"
)
6 changes: 3 additions & 3 deletions tests/test_df_normalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,6 @@ def test_remove_100(raw_name: str, normed_name: str) -> None:

@staticmethod
def test_norm(jpy_df: pd.DataFrame, normed_jpy_df: pd.DataFrame) -> None:
assert (
JPYNormalizer(jpy_df).norm().equals(normed_jpy_df)
), "The normalized `jpy_df` is different than expected"
assert JPYNormalizer(jpy_df).norm().equals(normed_jpy_df), (
"The normalized `jpy_df` is different than expected"
)
12 changes: 6 additions & 6 deletions tests/test_onezero.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ def df_fixture() -> pd.DataFrame:
reason="One-zero data is not available on https://www.onezerobank.com/currencies/"
)
def test_df(df: pd.DataFrame) -> None:
assert (
df.index == [CurrencyCode.EUR, CurrencyCode.USD]
).all(), "The currencies are not as expected"
assert (
df[("transfer", "buy")] < df[("transfer", "sell")]
).all(), "The buy rate is not lower than the sell rate"
assert (df.index == [CurrencyCode.EUR, CurrencyCode.USD]).all(), (
"The currencies are not as expected"
)
assert (df[("transfer", "buy")] < df[("transfer", "sell")]).all(), (
"The buy rate is not lower than the sell rate"
)

0 comments on commit cfe06bf

Please sign in to comment.