refactor: lazy load credentials for testing

This commit is contained in:
2026-04-06 07:20:23 +02:00
parent a8335d9920
commit 9b04160783
8 changed files with 110 additions and 19 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ Description: QQ Music API authenticator - currently only a proxy
from typing import Optional
from .base import BaseAuthenticator
from ..config import QQ_MUSIC_API_URL
from ..config import credentials
class QQMusicAuthenticator(BaseAuthenticator):
@@ -19,7 +19,7 @@ class QQMusicAuthenticator(BaseAuthenticator):
return "qqmusic"
def is_configured(self) -> bool:
return bool(QQ_MUSIC_API_URL)
return bool(credentials.QQ_MUSIC_API_URL)
async def authenticate(self) -> Optional[str]:
return QQ_MUSIC_API_URL
return credentials.QQ_MUSIC_API_URL