Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pyicloud/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from dataclasses import dataclass
from os import chmod, environ, makedirs, path, umask
from tempfile import gettempdir
from typing import Any, Dict, List, Mapping, Optional
from typing import Any, Dict, List, Mapping, Optional, cast
from uuid import uuid1

import srp
Expand Down Expand Up @@ -964,8 +964,9 @@ def request_2fa_code(self) -> bool:
auth_endpoint=self._auth_endpoint,
headers=self._get_auth_headers({"Accept": CONTENT_TYPE_JSON}),
boot_context=self._current_hsa2_boot_context(),
user_agent=self.session.headers.get(
"User-Agent", _HEADERS["User-Agent"]
user_agent=cast(
str,
self.session.headers.get("User-Agent", _HEADERS["User-Agent"]),
),
)
self._set_two_factor_delivery_state("trusted_device")
Expand Down
1 change: 1 addition & 0 deletions requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ pytest>=8.3.5
pytest-cov>=7.1.0
pytest-socket>=0.6.0
ruff>=0.9.9
types-requests>=2.32.0
Loading