Skip to content

Commit 7f90403

Browse files
committed
refactor(web_api): remove unused stdlib and private re-exports from __init__
1 parent 7a90254 commit 7f90403

2 files changed

Lines changed: 1 addition & 21 deletions

File tree

‎roborock/web_api/__init__.py‎

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,7 @@
77
``roborock.web_api`` module is re-exported here for backwards compatibility.
88
"""
99

10-
# Modules and the logger the former single-file module exposed. Re-exported so that
11-
# existing patch targets such as ``roborock.web_api.time.time`` keep resolving.
12-
import base64
13-
import hashlib
14-
import hmac
15-
import json
16-
import math
17-
import secrets
18-
import string
19-
import time
20-
21-
import aiohttp
22-
23-
from ._base import _LOGGER, BASE_URLS, IotLoginInfo, RoborockApiBase
24-
from ._hawk import _compact_json, _get_hawk_authentication, _process_extra_hawk_values
10+
from ._base import BASE_URLS, IotLoginInfo, RoborockApiBase
2511
from ._request import PreparedRequest
2612
from .auth import DEFAULT_AGREEMENT_MAJOR_VERSION, DEFAULT_AGREEMENT_MINOR_VERSION, AuthApi
2713
from .client import RoborockApiClient, UserWebApiClient

‎tests/web_api/test_client.py‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ def test_legacy_module_exports() -> None:
2222
"PreparedRequest",
2323
"RoborockApiClient",
2424
"UserWebApiClient",
25-
"_compact_json",
26-
"_get_hawk_authentication",
27-
"_LOGGER",
28-
"aiohttp",
29-
"secrets",
30-
"time",
3125
):
3226
assert hasattr(web_api, name), name
3327

0 commit comments

Comments
 (0)