Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ruff from v0.8.6 to v0.9.1 #2224

Merged
merged 1 commit into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
- --py39-plus

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.1
hooks:
- id: ruff
- id: ruff-format
Expand Down
5 changes: 1 addition & 4 deletions holidays/countries/lithuania.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ def _populate_public_holidays(self) -> None:
if self._year >= 1991:
self._add_holiday_jul_6(
# Statehood Day.
tr(
"Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) "
"ir Tautiškos giesmės diena"
)
tr("Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena")
)

# Assumption Day.
Expand Down
3 changes: 1 addition & 2 deletions holidays/countries/thailand.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,7 @@ def _populate_public_holidays(self):
if self._year >= 2019:
# HM King Bhumibol Adulyadej the Great's Birthday Anniversary.
name = tr(
"วันคล้ายวันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระบรมชนกาธิเบศร "
"มหาภูมิพลอดุลยเดชมหาราช บรมนาถบพิตร"
"วันคล้ายวันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระบรมชนกาธิเบศร มหาภูมิพลอดุลยเดชมหาราช บรมนาถบพิตร"
)
elif self._year >= 2016:
# HM King Bhumibol Adulyadej Birthday Anniversary.
Expand Down
3 changes: 1 addition & 2 deletions holidays/holiday_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,7 @@ def __init__(
# Deprecated arguments.
if prov_state := prov or state:
warnings.warn(
"Arguments prov and state are deprecated, use "
f"subdiv='{prov_state}' instead.",
f"Arguments prov and state are deprecated, use subdiv='{prov_state}' instead.",
DeprecationWarning,
)

Expand Down
3 changes: 1 addition & 2 deletions tests/countries/test_argentina.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ def test_may_revolution_day(self):

def test_sovereignty_over_malvinas_day(self):
name = (
"Día de los Derechos Argentinos sobre las Islas Malvinas, "
"Sandwich y del Atlántico Sur"
"Día de los Derechos Argentinos sobre las Islas Malvinas, Sandwich y del Atlántico Sur"
)

self.assertNoHolidayName(name, 1982, range(2001, 2050))
Expand Down
2 changes: 1 addition & 1 deletion tests/countries/test_germany.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def test_all_holidays_present(self):
self.assertEqual(
all_h,
y_2015,
f"missing: {all_h - y_2015 or 'no'}," f" extra: {y_2015 - all_h or 'no'}",
f"missing: {all_h - y_2015 or 'no'}, extra: {y_2015 - all_h or 'no'}",
)

def test_fixed_holidays(self):
Expand Down
10 changes: 2 additions & 8 deletions tests/countries/test_laos.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,7 @@ def test_l10n_default(self):
("2022-06-01", "ວັນປູກຕົ້ນໄມ້ແຫ່ງຊາດ; ວັນເດັກສາກົນ"),
(
"2022-07-13",
(
"ວັນຄ້າຍວັນເກີດ ທ່ານ ປະທານ ສຸພານຸວົງ; ວັນບຸນເຂົ້າພັນສາ; "
"ວັນປ່ອຍປາ ແລະ ວັນອະນຸລັກສັດນ້ຳ-ສັດປ່າແຫ່ງຊາດ"
),
("ວັນຄ້າຍວັນເກີດ ທ່ານ ປະທານ ສຸພານຸວົງ; ວັນບຸນເຂົ້າພັນສາ; ວັນປ່ອຍປາ ແລະ ວັນອະນຸລັກສັດນ້ຳ-ສັດປ່າແຫ່ງຊາດ"),
),
("2022-07-20", "ວັນສ້າງຕັ້ງສະຫະພັນແມ່ຍິງລາວ"),
("2022-08-13", "ວັນສື່ມວນຊົນແຫ່ງຊາດ ແລະ ວັນພິມຈໍາໜ່າຍ"),
Expand Down Expand Up @@ -466,10 +463,7 @@ def test_l10n_th(self):
("2022-06-01", "วันปลูกต้นไม้แห่งชาติ; วันเด็กสากล"),
(
"2022-07-13",
(
"วันคล้ายวันเกิดท่านประธานสุภานุวงศ์; วันอนุรักษ์สัตว์น้ำ สัตว์ป่า "
"และวันปล่อยปลาแห่งชาติ; วันเข้าพรรษา"
),
("วันคล้ายวันเกิดท่านประธานสุภานุวงศ์; วันอนุรักษ์สัตว์น้ำ สัตว์ป่า และวันปล่อยปลาแห่งชาติ; วันเข้าพรรษา"),
),
("2022-07-20", "วันก่อตั้งสหภาพแม่หญิงลาว"),
("2022-08-13", "วันสื่อสารมวลชนและการพิมพ์แห่งชาติ"),
Expand Down
3 changes: 1 addition & 2 deletions tests/countries/test_spain.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ def _assertVariableDays(self, year: int, subdiv_holidays: dict): # noqa: N802
self.assertEqual(
dt in prov_holidays,
subdiv in hol_provs,
f"Failed date `{dt:%Y-%m-%d}`, "
f"province `{subdiv}`: {', '.join(hol_provs)}",
f"Failed date `{dt:%Y-%m-%d}`, province `{subdiv}`: {', '.join(hol_provs)}",
)

def test_country_aliases(self):
Expand Down
Loading