From 6bc30eaf185d6f04b0942c34a874da9cc7f5784d Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Sun, 7 Sep 2025 19:41:43 +0200 Subject: [PATCH] lastgenre: Add docstrings to file load methods --- beetsplug/lastgenre/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/beetsplug/lastgenre/__init__.py b/beetsplug/lastgenre/__init__.py index 343c50888..53371e114 100644 --- a/beetsplug/lastgenre/__init__.py +++ b/beetsplug/lastgenre/__init__.py @@ -115,6 +115,10 @@ class LastGenrePlugin(plugins.BeetsPlugin): self.c14n_branches, self.canonicalize = self._load_c14n_tree() def _load_whitelist(self) -> set[str]: + """Load the whitelist from a text file. + + Default whitelist is used if config is True or empty string. + """ whitelist = set() wl_filename = self.config["whitelist"].get() if wl_filename in (True, ""): # Indicates the default whitelist. @@ -128,6 +132,11 @@ class LastGenrePlugin(plugins.BeetsPlugin): return whitelist def _load_c14n_tree(self) -> tuple[list[list[str]], bool]: + """Load the canonicalization tree from a YAML file. + + Default tree is used if config is True or empty string, or if + prefer_specific is enabled. + """ c14n_branches: list[list[str]] = [] c14n_filename = self.config["canonical"].get() canonicalize = c14n_filename is not False