drop 3.8, add pytest-retry (#592)

* drop 3.8, add pytest-retry

* fix mypy

* fix missing import
This commit is contained in:
sigma67 2024-07-13 20:40:50 +02:00 • committed by GitHub
commit 828b1b9810
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 321 additions and 362 deletions

View file

@ -1,4 +1,4 @@
from typing import Any, Dict, List, Optional, Union
from typing import Any, Optional, Union
from ytmusicapi.continuations import get_continuations
from ytmusicapi.mixins._protocol import MixinProtocol
@ -13,7 +13,7 @@ class SearchMixin(MixinProtocol):
scope: Optional[str] = None,
limit: int = 20,
ignore_spelling: bool = False,
) -> List[Dict]:
) -> list[dict]:
"""
Search YouTube music
Returns results within the provided category.
@ -136,7 +136,7 @@ class SearchMixin(MixinProtocol):
"""
body = {"query": query}
endpoint = "search"
search_results: List[Dict[str, Any]] = []
search_results: list[dict[str, Any]] = []
filters = [
"albums",
"artists",
@ -257,7 +257,7 @@ class SearchMixin(MixinProtocol):
return search_results
def get_search_suggestions(self, query: str, detailed_runs=False) -> Union[List[str], List[Dict]]:
def get_search_suggestions(self, query: str, detailed_runs=False) -> Union[list[str], list[dict]]:
"""
Get Search Suggestions