Skip to content

Commit

Permalink
Bump ruff version and apply it
Browse files Browse the repository at this point in the history
  • Loading branch information
glatterf42 committed Dec 20, 2024
1 parent 1a5a066 commit 9829ee6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
- types-requests
args: ["."]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
rev: v0.8.4
hooks:
- id: ruff
- id: ruff-format
Expand Down
52 changes: 28 additions & 24 deletions message_ix/tests/test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,30 +204,34 @@ def add_tm(df, name="Activity"):
assert not any(c in df2.columns for c in ["h", "m", "t"])

# Variable names were formatted by the callback
reg_var = pd.DataFrame(
[
["seattle", "Activity|canning_plant|production"],
["seattle", "Activity|transport_from_seattle|to_new-york"],
["seattle", "Activity|transport_from_seattle|to_chicago"],
["seattle", "Activity|transport_from_seattle|to_topeka"],
["san-diego", "Activity|canning_plant|production"],
["san-diego", "Activity|transport_from_san-diego|to_new-york"],
["san-diego", "Activity|transport_from_san-diego|to_chicago"],
["san-diego", "Activity|transport_from_san-diego|to_topeka"],
],
columns=["region", "variable"],
) if sys.version_info >= (3, 10) else pd.DataFrame(
[
["san-diego", "Activity|canning_plant|production"],
["san-diego", "Activity|transport_from_san-diego|to_chicago"],
["san-diego", "Activity|transport_from_san-diego|to_new-york"],
["san-diego", "Activity|transport_from_san-diego|to_topeka"],
["seattle", "Activity|canning_plant|production"],
["seattle", "Activity|transport_from_seattle|to_chicago"],
["seattle", "Activity|transport_from_seattle|to_new-york"],
["seattle", "Activity|transport_from_seattle|to_topeka"],
],
columns=["region", "variable"],
reg_var = (
pd.DataFrame(
[
["seattle", "Activity|canning_plant|production"],
["seattle", "Activity|transport_from_seattle|to_new-york"],
["seattle", "Activity|transport_from_seattle|to_chicago"],
["seattle", "Activity|transport_from_seattle|to_topeka"],
["san-diego", "Activity|canning_plant|production"],
["san-diego", "Activity|transport_from_san-diego|to_new-york"],
["san-diego", "Activity|transport_from_san-diego|to_chicago"],
["san-diego", "Activity|transport_from_san-diego|to_topeka"],
],
columns=["region", "variable"],
)
if sys.version_info >= (3, 10)
else pd.DataFrame(
[
["san-diego", "Activity|canning_plant|production"],
["san-diego", "Activity|transport_from_san-diego|to_chicago"],
["san-diego", "Activity|transport_from_san-diego|to_new-york"],
["san-diego", "Activity|transport_from_san-diego|to_topeka"],
["seattle", "Activity|canning_plant|production"],
["seattle", "Activity|transport_from_seattle|to_chicago"],
["seattle", "Activity|transport_from_seattle|to_new-york"],
["seattle", "Activity|transport_from_seattle|to_topeka"],
],
columns=["region", "variable"],
)
)
assert_frame_equal(df2[["region", "variable"]], reg_var)

Expand Down

0 comments on commit 9829ee6

Please sign in to comment.