From 9143f0f41ac7e1850b2f9a82e46a89cf73873f03 Mon Sep 17 00:00:00 2001 From: Mike A Date: Tue, 5 Mar 2024 23:56:59 +0100 Subject: [PATCH] chore(reports): Remove dead code --- findmy/reports/reports.py | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/findmy/reports/reports.py b/findmy/reports/reports.py index b9792f1..f8bd602 100644 --- a/findmy/reports/reports.py +++ b/findmy/reports/reports.py @@ -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,