Skip to content

Commit 0f46d94

Browse files
committed
Adjust code for python3.9+
1 parent d7ff40d commit 0f46d94

2 files changed

Lines changed: 18 additions & 9 deletions

File tree

aidbox_python_sdk/pytest_plugin.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ async def start_app(aiohttp_client):
1818
return app
1919

2020

21-
@pytest.fixture
21+
@pytest.fixture()
2222
async def client(aiohttp_client):
2323
"""Instance of app's server and client"""
2424
return await start_app(aiohttp_client)
@@ -39,7 +39,7 @@ async def _request(self, method, path, *args, **kwargs):
3939
return await super()._request(method, url, *args, **kwargs)
4040

4141

42-
@pytest.fixture
42+
@pytest.fixture()
4343
async def aidbox(client):
4444
"""HTTP client for making requests to Aidbox"""
4545
app = cast(web.Application, client.server.app)
@@ -52,7 +52,7 @@ async def aidbox(client):
5252
await session.close()
5353

5454

55-
@pytest.fixture
55+
@pytest.fixture()
5656
async def safe_db(aidbox, client, sdk):
5757
resp = await aidbox.post(
5858
"/$psql",
@@ -74,16 +74,16 @@ async def safe_db(aidbox, client, sdk):
7474
)
7575

7676

77-
@pytest.fixture
77+
@pytest.fixture()
7878
def sdk(client):
7979
return cast(web.Application, client.server.app)[ak.sdk]
8080

8181

82-
@pytest.fixture
82+
@pytest.fixture()
8383
def aidbox_client(client):
8484
return cast(web.Application, client.server.app)[ak.client]
8585

8686

87-
@pytest.fixture
87+
@pytest.fixture()
8888
def aidbox_db(client):
8989
return cast(web.Application, client.server.app)[ak.db]

aidbox_python_sdk/types.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
1-
from typing import Any, List
1+
from typing import Any
22

33
from aiohttp import web
44
from typing_extensions import TypedDict
55

6+
67
class Compliance(TypedDict, total=True):
78
fhirUrl: str
89
fhirCode: str
9-
fhirResource: List[str]
10+
fhirResource: list[str]
11+
1012

1113
SDKOperationRequest = TypedDict(
1214
"SDKOperationRequest",
13-
{"app": web.Application, "params": dict, "route-params": dict, "headers": dict, "resource": Any},
15+
{
16+
"app": web.Application,
17+
"params": dict,
18+
"route-params": dict,
19+
"form-params": dict,
20+
"headers": dict,
21+
"resource": Any,
22+
},
1423
)
1524

1625

0 commit comments

Comments
 (0)