From 9808e9353354404ab7391915053776b2a8b2d97b Mon Sep 17 00:00:00 2001 From: Ross Patterson Date: Mon, 25 Aug 2025 12:35:49 -0700 Subject: [PATCH] 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. --- src/ytdl_sub/config/config_validator.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/ytdl_sub/config/config_validator.py b/src/ytdl_sub/config/config_validator.py index 55a91f55..fbe54547 100644 --- a/src/ytdl_sub/config/config_validator.py +++ b/src/ytdl_sub/config/config_validator.py @@ -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