File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,12 +164,19 @@ def _load_blacklist(self):
164164 - Subsequent lines are indented (at least one space, typically 4 spaces) and
165165 contain a regex pattern to match a genre.
166166
167- Eg.:
168- artist name 1:
169- genre pattern 1
170- genre pattern 2
171- artist name 2:
172- genre pattern 3
167+
168+ Supports a special '*' key in the blacklist for
169+ global forbidden genres.
170+
171+ Example blacklist file format:
172+ Artist Name:
173+ pop
174+ rock
175+ Another Artist Name:
176+ jazz
177+ *:
178+ spoken word
179+ comedy
173180
174181 Raises:
175182 UserError: if the file format is invalid.
@@ -350,17 +357,9 @@ def _is_valid(self, genre: str) -> bool:
350357 return False
351358
352359 def _is_forbidden (self , genre : str , artist : str ) -> bool :
353- """Return True if the genre is forbidden for the artist.
360+ """Return True if the genre is on the blacklist for the artist.
354361
355- Supports a special '*' key in the blacklist for
356- global forbidden genres.
357-
358- Example blacklist file format:
359- Artist Name:
360- pop
361- rock
362- *:
363- spoken word
362+ See `_load_blacklist` docstring for the blacklist file format.
364363 """
365364 if not self .blacklist :
366365 return False
You can’t perform that action at this time.
0 commit comments