Skip to content

Commit

Permalink
update poetry to 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eggplants committed Jan 9, 2025
1 parent ac8050f commit 965463b
Show file tree
Hide file tree
Showing 5 changed files with 363 additions and 284 deletions.
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ repos:
rev: v2.5.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/python-poetry/poetry
rev: 2.0.0
hooks:
- id: poetry-check
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion afxdl/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def __save_track(

audio = MutagenFile(audio_path, easy=True)

if not isinstance(audio, (EasyID3, EasyMP3)):
if not isinstance(audio, EasyID3 | EasyMP3):
msg = f"Failed to load audio file: {audio_path}"
raise TypeError(msg)
if type(audio) is EasyMP3:
Expand Down
4 changes: 2 additions & 2 deletions afxdl/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

import locale
from datetime import datetime, timezone
from datetime import UTC, datetime
from pathlib import Path
from typing import TYPE_CHECKING

Expand Down Expand Up @@ -77,7 +77,7 @@ def __get_albums_by_page(
class_="product-release-date product-release-date-past",
).text.strip()
release_date = (
datetime.strptime(date_str, "%d %B %Y").replace(tzinfo=timezone.utc).date()
datetime.strptime(date_str, "%d %B %Y").replace(tzinfo=UTC).date()
)
catalog_number_elm = product_elm.find("dd", class_="catalogue-number")
albums.append(
Expand Down
Loading

0 comments on commit 965463b

Please sign in to comment.