Skip to content

Commit 28b6cd0

Browse files
committed
Merge branch 'feat/async-api' of github.com:Unleash/unleash-client-python into feat/async-api
2 parents a9cd5af + 9357f22 commit 28b6cd0

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

UnleashClient/api/async_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import asyncio
2+
import json
23
from typing import Any, Mapping, Optional, Tuple
4+
35
import aiohttp
46

5-
import json
67
from UnleashClient.api.packet_building import build_registration_packet
78
from UnleashClient.constants import (
89
APPLICATION_HEADERS,
910
FEATURES_URL,
10-
REGISTER_URL,
1111
METRICS_URL,
12+
REGISTER_URL,
1213
)
1314
from UnleashClient.utils import LOGGER
1415

15-
1616
_TRANSIENT_ERROR_CODES = {500, 502, 504}
1717

1818

UnleashClient/api/packet_building.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from datetime import datetime, timezone
22
from platform import python_implementation, python_version
3+
34
import yggdrasil_engine
5+
46
from UnleashClient.constants import (
57
CLIENT_SPEC_VERSION,
68
SDK_NAME,

tests/unit_tests/api/test_async_feature.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import json
2+
23
import pytest
34
from aioresponses import aioresponses
45

tests/unit_tests/api/test_async_metrics.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import json
2+
23
import pytest
3-
from aioresponses import aioresponses
44
from aiohttp import ClientConnectionError
5+
from aioresponses import aioresponses
56
from yarl import URL as YURL
67

78
from UnleashClient.api.async_api import send_metrics_async

tests/unit_tests/api/test_async_register.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import json
2+
23
import pytest
3-
from aioresponses import aioresponses
44
from aiohttp import ClientConnectionError
5+
from aioresponses import aioresponses
56
from yarl import URL as YURL
67

78
from UnleashClient.api.async_api import register_client_async
8-
from UnleashClient.constants import REGISTER_URL, CLIENT_SPEC_VERSION
9+
from UnleashClient.constants import CLIENT_SPEC_VERSION, REGISTER_URL
910

1011
BASE_URL = "https://example.com"
1112
FULL_REGISTER_URL = BASE_URL + REGISTER_URL

0 commit comments

Comments
 (0)