linter fixes
This commit is contained in:
parent
ce04722763
commit
83db5730f2
@ -94,7 +94,9 @@ class DataUtils:
|
||||
|
||||
|
||||
def scrub_lyrics(self, lyrics: str) -> str:
|
||||
"""Regex Chain"""
|
||||
"""Regex Chain
|
||||
@lyrics: The lyrics (str) to scrub
|
||||
"""
|
||||
lyrics = regex.sub(r'(\[.*?\])(\s){0,}(\:){0,1}', '', lyrics)
|
||||
lyrics = regex.sub(r'(\d?)(Embed\b)', '', lyrics, flags=regex.IGNORECASE)
|
||||
lyrics = regex.sub(r'\n{2}', '\n', lyrics) # Gaps between verses
|
||||
@ -102,6 +104,9 @@ class DataUtils:
|
||||
return lyrics
|
||||
|
||||
def create_lrc_object(self, lrc_str: str) -> list[dict]:
|
||||
"""Create LRC Object
|
||||
@lrc_str: The raw LRCLib syncedLyrics (str)
|
||||
"""
|
||||
lrc_out: list = []
|
||||
for line in lrc_str.split("\n"):
|
||||
_timetag = None
|
||||
@ -126,4 +131,3 @@ class DataUtils:
|
||||
logging.info("util: returning %s, type: %s",
|
||||
lrc_out, type(lrc_out))
|
||||
return lrc_out
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user