File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -160,12 +160,19 @@ def _load_blacklist(self):
160160 - Subsequent lines are indented (at least one space, typically 4 spaces) and
161161 contain a regex pattern to match a genre.
162162
163- Eg.:
164- artist name 1:
165- genre pattern 1
166- genre pattern 2
167- artist name 2:
168- genre pattern 3
163+
164+ Supports a special '*' key in the blacklist for
165+ global forbidden genres.
166+
167+ Example blacklist file format:
168+ Artist Name:
169+ pop
170+ rock
171+ Another Artist Name:
172+ jazz
173+ *:
174+ spoken word
175+ comedy
169176
170177 Raises:
171178 UserError: if the file format is invalid.
@@ -331,17 +338,9 @@ def _is_valid(self, genre: str) -> bool:
331338 return False
332339
333340 def _is_forbidden (self , genre : str , artist : str ) -> bool :
334- """Return True if the genre is forbidden for the artist.
341+ """Return True if the genre is on the blacklist for the artist.
335342
336- Supports a special '*' key in the blacklist for
337- global forbidden genres.
338-
339- Example blacklist file format:
340- Artist Name:
341- pop
342- rock
343- *:
344- spoken word
343+ See `_load_blacklist` docstring for the blacklist file format.
345344 """
346345 if not self .blacklist :
347346 return False
You can’t perform that action at this time.
0 commit comments