docs(logs): Mimick argparse option default format

I find it more readable to use punctuation to separate technical information, such as
required vs optional or default values, from narrative description. Follow argparse's
lead, and put such information in parens following the narrative description.
This commit is contained in:
Ross Patterson 2025-08-25 12:35:49 -07:00
parent 28b5a81d19
commit 9808e93533
No known key found for this signature in database
GPG key ID: 2EFF7CCE6828E359

View file

@ -67,7 +67,7 @@ class PersistLogsValidator(StrictDictValidator):
@property
def logs_directory(self) -> str:
"""
Required. The directory to store the logs in.
The directory to store the logs in. (required)
"""
return self._logs_directory.value
@ -92,7 +92,7 @@ class PersistLogsValidator(StrictDictValidator):
@property
def keep_successful_logs(self) -> bool:
"""
Optional. Whether to store logs when downloading is successful. Defaults to True.
Whether to store logs when downloading is successful. (default ``True``)
"""
return self._keep_successful_logs.value
@ -147,7 +147,7 @@ class ConfigOptions(StrictDictValidator):
def working_directory(self) -> str:
"""
The directory to temporarily store downloaded files before moving them into their final
directory. Defaults to .ytdl-sub-working-directory
directory. (default ``./.ytdl-sub-working-directory``)
"""
# Expands tildas to actual paths, use native os sep
return os.path.expanduser(self._working_directory.value.replace(posixpath.sep, os.sep))
@ -155,7 +155,7 @@ class ConfigOptions(StrictDictValidator):
@property
def umask(self) -> Optional[str]:
"""
Umask (octal format) to apply to every created file. Defaults to "022".
Umask in octal format to apply to every created file. (default ``022``)
"""
return self._umask.value
@ -214,24 +214,25 @@ class ConfigOptions(StrictDictValidator):
def lock_directory(self) -> str:
"""
The directory to temporarily store file locks, which prevents multiple instances
of ``ytdl-sub`` from running. Note that file locks do not work on network-mounted
directories. Ensure that this directory resides on the host machine. Defaults to ``/tmp``.
of ``ytdl-sub`` from running. Note that file locks do not work on
network-mounted directories. Ensure that this directory resides on the host
machine. (default ``/tmp``)
"""
return self._lock_directory.value
@property
def ffmpeg_path(self) -> str:
"""
Path to ffmpeg executable. Defaults to ``/usr/bin/ffmpeg`` for Linux, and
``ffmpeg.exe`` for Windows (in the same directory as ytdl-sub).
Path to ffmpeg executable. (default ``/usr/bin/ffmpeg`` for Linux,
``./ffmpeg.exe`` in the same directory as ytdl-sub for Windows)
"""
return self._ffmpeg_path.value
@property
def ffprobe_path(self) -> str:
"""
Path to ffprobe executable. Defaults to ``/usr/bin/ffprobe`` for Linux, and
``ffprobe.exe`` for Windows (in the same directory as ytdl-sub).
Path to ffprobe executable. (default ``/usr/bin/ffprobe`` for Linux,
``./ffprobe.exe`` in the same directory as ytdl-sub for Windows)
"""
return self._ffprobe_path.value