diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index fed2378a..0d9f3787 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,11 +11,11 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Install Poetry run: curl -sSL https://install.python-poetry.org | python3 - - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: 3.13 cache: 'poetry' diff --git a/tests/test_backoff.py b/tests/test_backoff.py index 14df71ff..9c05c0dc 100644 --- a/tests/test_backoff.py +++ b/tests/test_backoff.py @@ -12,7 +12,6 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . - """Offline tests for abuse detection and request backoff (no TIDAL account needed).""" import datetime diff --git a/tests/test_parsing.py b/tests/test_parsing.py index ddbc9f30..35a4ff34 100644 --- a/tests/test_parsing.py +++ b/tests/test_parsing.py @@ -12,7 +12,6 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . - """Offline tests for parsing incomplete track and album metadata.""" import pytest diff --git a/tests/test_token_refresh.py b/tests/test_token_refresh.py index 6e145fca..d857e713 100644 --- a/tests/test_token_refresh.py +++ b/tests/test_token_refresh.py @@ -12,7 +12,6 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . - """Offline tests for the OAuth token refresh logic (no TIDAL account needed).""" import datetime diff --git a/tidalapi/request.py b/tidalapi/request.py index 0ca85170..a7126267 100644 --- a/tidalapi/request.py +++ b/tidalapi/request.py @@ -90,13 +90,13 @@ def _refresh_access_token(self, stale_access_token: Optional[str]) -> bool: """Refresh the access token, at most once for concurrent callers. Requests are often issued from several threads (e.g. the paginated workers). If - they all hit an expired token at the same time, each would POST the same - refresh token. TIDAL rotates refresh tokens, so every POST after the first - would use a token that has just been invalidated. + they all hit an expired token at the same time, each would POST the same refresh + token. TIDAL rotates refresh tokens, so every POST after the first would use a + token that has just been invalidated. - :param stale_access_token: The access token the caller's request was sent - with. If the session holds a different one by the time the lock is - acquired, another thread has already refreshed and no new refresh is made. + :param stale_access_token: The access token the caller's request was sent with. + If the session holds a different one by the time the lock is acquired, + another thread has already refreshed and no new refresh is made. :return: True if the session holds a valid, refreshed access token. """ with self._refresh_lock: @@ -125,8 +125,8 @@ def _raise_if_backing_off(self) -> None: def _start_backoff_if_needed(self, response: requests.Response) -> None: """Hold back further requests after a rate limit or anti-abuse response. - Requests made while TIDAL is limiting or suspecting the account only prolong - it, and can lead to a permanent ban. + Requests made while TIDAL is limiting or suspecting the account only prolong it, + and can lead to a permanent ban. """ if not self.config.backoff: return diff --git a/tidalapi/session.py b/tidalapi/session.py index 3d0b27bf..92bbc12c 100644 --- a/tidalapi/session.py +++ b/tidalapi/session.py @@ -484,8 +484,8 @@ def login_pkce(self, fn_print: Callable[[str], None] = print) -> None: # self.client_enable_hires() def client_enable_hires(self): - """Swap `config.client_id` and `config.client_secret` for the PKCE pair, which is - the only one entitled to hi-res streams. + """Swap `config.client_id` and `config.client_secret` for the PKCE pair, which + is the only one entitled to hi-res streams. The limited input device login (:meth:`login_oauth`) still uses the original client, as TIDAL rejects the PKCE client on the device authorization endpoint.