Skip to content

Commit 496376e

Browse files
authored
Merge pull request #590 from opsmill/pog-relogin-decorator
Fix typing on relogin decorator
2 parents 78cf233 + be0b0cf commit 496376e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

infrahub_sdk/client.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ class ProcessRelationsNodeSync(TypedDict):
7979
related_nodes: list[InfrahubNodeSync]
8080

8181

82-
def handle_relogin(func: Callable[..., Coroutine[Any, Any, httpx.Response]]): # type: ignore[no-untyped-def]
82+
def handle_relogin(
83+
func: Callable[..., Coroutine[Any, Any, httpx.Response]],
84+
) -> Callable[..., Coroutine[Any, Any, httpx.Response]]:
8385
@wraps(func)
8486
async def wrapper(client: InfrahubClient, *args: Any, **kwargs: Any) -> httpx.Response:
8587
response = await func(client, *args, **kwargs)
@@ -93,7 +95,7 @@ async def wrapper(client: InfrahubClient, *args: Any, **kwargs: Any) -> httpx.Re
9395
return wrapper
9496

9597

96-
def handle_relogin_sync(func: Callable[..., httpx.Response]): # type: ignore[no-untyped-def]
98+
def handle_relogin_sync(func: Callable[..., httpx.Response]) -> Callable[..., httpx.Response]:
9799
@wraps(func)
98100
def wrapper(client: InfrahubClientSync, *args: Any, **kwargs: Any) -> httpx.Response:
99101
response = func(client, *args, **kwargs)

0 commit comments

Comments
 (0)