From 95bf0021d8c5d6d1a83920510c05c5c1ba14415c Mon Sep 17 00:00:00 2001 From: Jesse Bannon Date: Mon, 21 Nov 2022 11:01:29 -0800 Subject: [PATCH] change order of docstrings --- src/ytdl_sub/plugins/chapters.py | 36 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/ytdl_sub/plugins/chapters.py b/src/ytdl_sub/plugins/chapters.py index dbd756e8..084bc7d5 100644 --- a/src/ytdl_sub/plugins/chapters.py +++ b/src/ytdl_sub/plugins/chapters.py @@ -138,6 +138,24 @@ class ChaptersOptions(PluginOptions): """ return self._embed_chapters + @property + def allow_chapters_from_comments(self) -> bool: + """ + Optional. If chapters do not exist in the video/description itself, attempt to scrape + comments to find the chapters. Defaults to False. + """ + return self._allow_chapters_from_comments + + @property + def remove_chapters_regex(self) -> Optional[List[re.Pattern]]: + """ + Optional. List of regex patterns to match chapter titles against and remove them from the + entry. + """ + if self._remove_chapters_regex: + return [validator.compiled_regex for validator in self._remove_chapters_regex.list] + return None + @property def sponsorblock_categories(self) -> Optional[List[str]]: """ @@ -168,16 +186,6 @@ class ChaptersOptions(PluginOptions): return category_list return None - @property - def remove_chapters_regex(self) -> Optional[List[re.Pattern]]: - """ - Optional. List of regex patterns to match chapter titles against and remove them from the - entry. - """ - if self._remove_chapters_regex: - return [validator.compiled_regex for validator in self._remove_chapters_regex.list] - return None - @property def force_key_frames(self) -> bool: """ @@ -187,14 +195,6 @@ class ChaptersOptions(PluginOptions): """ return self._force_key_frames - @property - def allow_chapters_from_comments(self) -> bool: - """ - Optional. If chapters do not exist in the video/description itself, attempt to scrape - comments to find the chapters. Defaults to False. - """ - return self._allow_chapters_from_comments - class ChaptersPlugin(Plugin[ChaptersOptions]): plugin_options_type = ChaptersOptions