From bd0c02437af491274d25fbcb82deaa3f10ba7269 Mon Sep 17 00:00:00 2001 From: J0J0 Todos <2733783+JOJ0@users.noreply.github.com> Date: Sat, 11 Jan 2025 09:41:44 +0100 Subject: [PATCH] Apply temp logging leftover review suggestions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Useless variables that only were introduced for temporary debug logging while refactoring earlier. Get rid of them. Co-authored-by: Šarūnas Nejus --- beetsplug/lastgenre/__init__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/beetsplug/lastgenre/__init__.py b/beetsplug/lastgenre/__init__.py index b5bfa552a..dca09e037 100644 --- a/beetsplug/lastgenre/__init__.py +++ b/beetsplug/lastgenre/__init__.py @@ -248,17 +248,14 @@ class LastGenrePlugin(plugins.BeetsPlugin): # c14n only adds allowed genres but we may have had forbidden genres in # the original tags list - tags = [x for x in tags if self._is_allowed(x)] - - return tags + return [x for x in tags if self._is_allowed(x)] def fetch_genre(self, lastfm_obj): """Return the genre for a pylast entity or None if no suitable genre can be found. Ex. 'Electronic, House, Dance' """ min_weight = self.config["min_weight"].get(int) - fetched = self._tags_for(lastfm_obj, min_weight) - return fetched + return self._tags_for(lastfm_obj, min_weight) def _is_allowed(self, genre): """Returns True if genre in whitelist or whitelist disabled."""