Skip to content

Commit

Permalink
Bump formatting to ruff 0.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jatkinson1000 committed Jan 23, 2025
1 parent 599cb5c commit ec9eaa4
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 15 deletions.
4 changes: 1 addition & 3 deletions archeryutils/classifications/classification_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,7 @@ def get_groupname(bowstyle: str, gender: str, age_group: str) -> str:
bowstyle = "longbow"

groupname = (
f"{age_group.lower().replace(' ', '')}_"
f"{gender.lower()}_"
f"{bowstyle.lower()}"
f"{age_group.lower().replace(' ', '')}_{gender.lower()}_{bowstyle.lower()}"
)

return groupname
Expand Down
2 changes: 1 addition & 1 deletion archeryutils/classifications/tests/test_agb_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def test_agb_field_classification_scores_invalid(
with pytest.raises(
KeyError,
match=(
f"{age_group.lower().replace(' ','')}_"
f"{age_group.lower().replace(' ', '')}_"
f"{gender.lower()}_{bowstyle.lower()}"
),
):
Expand Down
2 changes: 1 addition & 1 deletion archeryutils/classifications/tests/test_agb_indoor.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def test_agb_indoor_classification_scores_invalid(
with pytest.raises(
KeyError,
match=(
f"{age_group.lower().replace(' ','')}_"
f"{age_group.lower().replace(' ', '')}_"
f"{gender.lower()}_{bowstyle.lower()}"
),
):
Expand Down
2 changes: 1 addition & 1 deletion archeryutils/classifications/tests/test_agb_old_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def test_agb_old_field_classification_scores_invalid(
with pytest.raises(
KeyError,
match=(
f"{age_group.lower().replace(' ','')}_"
f"{age_group.lower().replace(' ', '')}_"
f"{gender.lower()}_{bowstyle.lower()}"
),
):
Expand Down
2 changes: 1 addition & 1 deletion archeryutils/classifications/tests/test_agb_old_indoor.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def test_agb_old_indoor_classification_scores_invalid(
with pytest.raises(
KeyError,
match=(
f"{age_group.lower().replace(' ','')}_"
f"{age_group.lower().replace(' ', '')}_"
f"{gender.lower()}_{bowstyle.lower()}"
),
):
Expand Down
2 changes: 1 addition & 1 deletion archeryutils/classifications/tests/test_agb_outdoor.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def test_agb_outdoor_classification_scores_invalid(
with pytest.raises(
KeyError,
match=(
f"{age_group.lower().replace(' ','')}_"
f"{age_group.lower().replace(' ', '')}_"
f"{gender.lower()}_{bowstyle.lower()}"
),
):
Expand Down
3 changes: 1 addition & 2 deletions archeryutils/length.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,7 @@ def parse_optional_units(

if units not in supported:
msg = (
f"Unit {units!r} not recognised. "
f"Select from {definitive_units(supported)}."
f"Unit {units!r} not recognised. Select from {definitive_units(supported)}."
)
raise ValueError(msg)
return quantity, definitive_unit(units)
Expand Down
6 changes: 3 additions & 3 deletions archeryutils/load_rounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class DotDict(dict[str, Any]):

def __getattr__(self, name: str) -> Any:
"""
getter.
Getter.
Parameters
----------
Expand All @@ -144,7 +144,7 @@ def __getattr__(self, name: str) -> Any:

def __setattr__(self, name: str, value: Any) -> None:
"""
setter.
Setter.
Parameters
----------
Expand All @@ -157,7 +157,7 @@ def __setattr__(self, name: str, value: Any) -> None:

def __delattr__(self, name: str) -> None:
"""
delete.
Delete.
Parameters
----------
Expand Down
4 changes: 2 additions & 2 deletions archeryutils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def _get_sys_info() -> list: # pragma: no cover
("machine", f"{machine}"),
("processor", f"{processor}"),
("byteorder", f"{sys.byteorder}"),
("LC_ALL", f'{os.environ.get("LC_ALL", "None")}'),
("LANG", f'{os.environ.get("LANG", "None")}'),
("LC_ALL", f"{os.environ.get('LC_ALL', 'None')}"),
("LANG", f"{os.environ.get('LANG', 'None')}"),
("LOCALE", f"{locale.getlocale()}"),
],
)
Expand Down

0 comments on commit ec9eaa4

Please sign in to comment.