mirror of
https://github.com/malmeloo/FindMy.py.git
synced 2026-04-18 00:53:56 +02:00
chore(reports): Remove dead code
This commit is contained in:
@@ -5,28 +5,18 @@ import base64
|
||||
import hashlib
|
||||
import struct
|
||||
from datetime import datetime, timezone
|
||||
from typing import TYPE_CHECKING, Sequence, TypedDict, overload
|
||||
from typing import TYPE_CHECKING, Sequence, overload
|
||||
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
from cryptography.hazmat.primitives.asymmetric import ec
|
||||
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
|
||||
from typing_extensions import Unpack, override
|
||||
from typing_extensions import override
|
||||
|
||||
from findmy.keys import KeyPair
|
||||
from findmy.util.http import HttpSession
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .account import AsyncAppleAccount
|
||||
|
||||
_session = HttpSession()
|
||||
|
||||
|
||||
class _FetcherConfig(TypedDict):
|
||||
user_id: str
|
||||
device_id: str
|
||||
dsid: str
|
||||
search_party_token: str
|
||||
|
||||
|
||||
def _decrypt_payload(payload: bytes, key: KeyPair) -> bytes:
|
||||
eph_key = ec.EllipticCurvePublicKey.from_encoded_point(
|
||||
@@ -181,14 +171,6 @@ class LocationReportsFetcher:
|
||||
"""
|
||||
self._account: AsyncAppleAccount = account
|
||||
|
||||
self._http: HttpSession = HttpSession()
|
||||
|
||||
self._config: _FetcherConfig | None = None
|
||||
|
||||
def apply_config(self, **conf: Unpack[_FetcherConfig]) -> None:
|
||||
"""Configure internal variables necessary to make reports fetching calls."""
|
||||
self._config = conf
|
||||
|
||||
@overload
|
||||
async def fetch_reports(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user