docstring stuff

This commit is contained in:
2025-01-19 07:01:07 -05:00
parent 151643c5dc
commit be0ef08f3d
9 changed files with 118 additions and 52 deletions

View File

@@ -14,7 +14,9 @@ logger = logging.getLogger()
logger.setLevel(logging.INFO)
class Aggregate:
"""Aggregate all source methods"""
"""
Aggregate all source methods
"""
def __init__(self, exclude_methods=None):
if not exclude_methods:
@@ -22,7 +24,15 @@ class Aggregate:
self.exclude_methods = exclude_methods
async def search(self, artist: str, song: str, plain: bool = True) -> Optional[LyricsResult]:
"""Aggregate Search"""
"""
Aggregate Search
Args:
artist (str): Artist to search
song (str): Song to search
plain (bool): Search for plain lyrics (lrc otherwise)
Returns:
LyricsResult|None: The result, if found - None otherwise.
"""
if not plain:
logging.info("LRCs requested, limiting search to LRCLib")
self.exclude_methods = ["genius", "cache"]