diff options
| author | Robert Honz <exislow+github@gmail.com> | 2025-06-29 14:14:03 +0200 |
|---|---|---|
| committer | Robert Honz <exislow+github@gmail.com> | 2025-06-29 14:24:15 +0200 |
| commit | f0412c6f9611e30976c5230aec2b8596fa33c7a5 (patch) | |
| tree | 91a3563a0f817a96e015d643f6b1bbf2d4793ad8 /tidal_dl_ng | |
| parent | d53077f3f28f3b429f51156de4636a23e77e8d5a (diff) | |
| download | tidal-dl-ng-f0412c6f9611e30976c5230aec2b8596fa33c7a5.tar.gz | |
👷 Re-arranged imports.
Diffstat (limited to 'tidal_dl_ng')
| -rw-r--r-- | tidal_dl_ng/cli.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/tidal_dl_ng/cli.py b/tidal_dl_ng/cli.py index 3e47a1a..3074306 100644 --- a/tidal_dl_ng/cli.py +++ b/tidal_dl_ng/cli.py @@ -2,14 +2,13 @@ import signal from collections.abc import Callable from pathlib import Path -from typing import Annotated, Optional +from typing import Annotated import typer -from rich.console import Group +from rich.console import Console, Group from rich.live import Live from rich.progress import ( BarColumn, - Console, Progress, SpinnerColumn, TaskProgressColumn, @@ -174,16 +173,14 @@ def _download(ctx: typer.Context, urls: list[str], try_login: bool = True) -> bo @app.callback() def callback_app( ctx: typer.Context, - version: Annotated[ - Optional[bool], typer.Option("--version", "-v", callback=version_callback, is_eager=True) - ] = None, + version: Annotated[bool | None, typer.Option("--version", "-v", callback=version_callback, is_eager=True)] = None, ): ctx.obj = {"tidal": None} @app.command(name="cfg") def settings_management( - names: Annotated[Optional[list[str]], typer.Argument()] = None, + names: Annotated[list[str] | None, typer.Argument()] = None, editor: Annotated[ bool, typer.Option("--editor", "-e", help="Open the settings file in your default editor.") ] = False, @@ -262,9 +259,9 @@ def logout() -> bool: @app.command(name="dl") def download( ctx: typer.Context, - urls: Annotated[Optional[list[str]], typer.Argument()] = None, + urls: Annotated[list[str] | None, typer.Argument()] = None, file_urls: Annotated[ - Optional[Path], + Path | None, typer.Option( "--list", "-l", |
