👷 Re-arranged imports.
This commit is contained in:
+6
-9
@@ -2,14 +2,13 @@
|
|||||||
import signal
|
import signal
|
||||||
from collections.abc import Callable
|
from collections.abc import Callable
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Annotated, Optional
|
from typing import Annotated
|
||||||
|
|
||||||
import typer
|
import typer
|
||||||
from rich.console import Group
|
from rich.console import Console, Group
|
||||||
from rich.live import Live
|
from rich.live import Live
|
||||||
from rich.progress import (
|
from rich.progress import (
|
||||||
BarColumn,
|
BarColumn,
|
||||||
Console,
|
|
||||||
Progress,
|
Progress,
|
||||||
SpinnerColumn,
|
SpinnerColumn,
|
||||||
TaskProgressColumn,
|
TaskProgressColumn,
|
||||||
@@ -174,16 +173,14 @@ def _download(ctx: typer.Context, urls: list[str], try_login: bool = True) -> bo
|
|||||||
@app.callback()
|
@app.callback()
|
||||||
def callback_app(
|
def callback_app(
|
||||||
ctx: typer.Context,
|
ctx: typer.Context,
|
||||||
version: Annotated[
|
version: Annotated[bool | None, typer.Option("--version", "-v", callback=version_callback, is_eager=True)] = None,
|
||||||
Optional[bool], typer.Option("--version", "-v", callback=version_callback, is_eager=True)
|
|
||||||
] = None,
|
|
||||||
):
|
):
|
||||||
ctx.obj = {"tidal": None}
|
ctx.obj = {"tidal": None}
|
||||||
|
|
||||||
|
|
||||||
@app.command(name="cfg")
|
@app.command(name="cfg")
|
||||||
def settings_management(
|
def settings_management(
|
||||||
names: Annotated[Optional[list[str]], typer.Argument()] = None,
|
names: Annotated[list[str] | None, typer.Argument()] = None,
|
||||||
editor: Annotated[
|
editor: Annotated[
|
||||||
bool, typer.Option("--editor", "-e", help="Open the settings file in your default editor.")
|
bool, typer.Option("--editor", "-e", help="Open the settings file in your default editor.")
|
||||||
] = False,
|
] = False,
|
||||||
@@ -262,9 +259,9 @@ def logout() -> bool:
|
|||||||
@app.command(name="dl")
|
@app.command(name="dl")
|
||||||
def download(
|
def download(
|
||||||
ctx: typer.Context,
|
ctx: typer.Context,
|
||||||
urls: Annotated[Optional[list[str]], typer.Argument()] = None,
|
urls: Annotated[list[str] | None, typer.Argument()] = None,
|
||||||
file_urls: Annotated[
|
file_urls: Annotated[
|
||||||
Optional[Path],
|
Path | None,
|
||||||
typer.Option(
|
typer.Option(
|
||||||
"--list",
|
"--list",
|
||||||
"-l",
|
"-l",
|
||||||
|
|||||||
Reference in New Issue
Block a user