summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Honz <exislow+github@gmail.com>2025-01-04 13:58:15 +0100
committerRobert Honz <exislow+github@gmail.com>2025-01-04 13:58:15 +0100
commite78194353a1caca3b2aa3d38c1c3ff5f08ebe2c3 (patch)
treec3457614938185c3a20246e9b88debdd55a5bd2c
parenta1e22acacce12780db0bec4faabea01ebf9f6ef1 (diff)
downloadtidal-dl-ng-e78194353a1caca3b2aa3d38c1c3ff5f08ebe2c3.tar.gz
👷 Formatting and docstrings.
-rw-r--r--tidal_dl_ng/cli.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/tidal_dl_ng/cli.py b/tidal_dl_ng/cli.py
index fedbe9a..54cbb5e 100644
--- a/tidal_dl_ng/cli.py
+++ b/tidal_dl_ng/cli.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
+from collections.abc import Callable
from pathlib import Path
-from typing import Annotated, Optional, Callable
+from typing import Annotated, Optional
import typer
from rich.live import Live
@@ -39,14 +40,16 @@ def version_callback(value: bool):
def _download(ctx: typer.Context, urls: list[str], try_login: bool = True) -> bool:
- """
- Shared logic for downloading a list of URLs.
+ """Invokes download function and tracks progress.
- :param ctx: The typer context
+ :param ctx: The typer context object.
:type ctx: typer.Context
:param urls: The list of URLs to download.
:type urls: list[str]
+ :param try_login: If true, attempts to login to TIDAL.
+ :type try_login: bool
:return: True if ran successfully.
+ :rtype: bool
"""
if try_login:
# Call login method to validate the token.
@@ -145,6 +148,7 @@ def settings_management(
If only one argument is given, the value will be printed for this option.
To set a value for an option simply pass the value as the second argument
+ :param editor: If set, your favorite system editor will be opened.
:param names: (Optional) None (list all options), one (list the value only for this option) or two arguments
(set the value for the option).
"""