diff --git a/pyproject.toml b/pyproject.toml index 8131e0a..cfe89eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta" [project] name = "yandex-music-downloader" -version = "3.0.0b0" +version = "3.0.0b1" description = "Загрузчик музыки с сервиса Яндекс.Музыка" requires-python = ">=3.9" readme = "README.md" diff --git a/ymd/cli.py b/ymd/cli.py index 9b54dea..5204eb8 100644 --- a/ymd/cli.py +++ b/ymd/cli.py @@ -7,7 +7,7 @@ import time import typing from collections.abc import Generator, Iterable from pathlib import Path -from typing import Optional +from typing import Optional, Union from urllib.parse import urlparse from yandex_music import Album, Client, Playlist, Track @@ -151,7 +151,7 @@ def main(): client = Client(args.token).init() result_tracks: Iterable[Track] = [] - def album_tracks_gen(album_ids: Iterable[int | str]) -> Generator[Track]: + def album_tracks_gen(album_ids: Iterable[Union[int, str]]) -> Generator[Track]: for album_id in album_ids: if full_album := client.albums_with_tracks(album_id): if volumes := full_album.volumes: diff --git a/ymd/core.py b/ymd/core.py index 5e148ad..9cc384a 100644 --- a/ymd/core.py +++ b/ymd/core.py @@ -15,7 +15,7 @@ DEFAULT_PATH_PATTERN = Path("#album-artist", "#album", "#number - #title") DEFAULT_COVER_RESOLUTION = 400 -def full_title(obj: YandexMusicObject) -> str | None: +def full_title(obj: YandexMusicObject) -> Optional[str]: result = obj["title"] if result is None: return