Skip to content

Commit 085579a

Browse files
author
Andrei Neagu
committed
typing
1 parent e99b4fb commit 085579a

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

packages/service-library/src/servicelib/fastapi/docker.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import logging
33
from collections.abc import AsyncIterator
44
from contextlib import AsyncExitStack
5-
from typing import Any, Final
5+
from typing import Final
66

77
import aiodocker
88
import aiohttp
@@ -21,9 +21,7 @@
2121
_DOCKER_API_PROXY_SETTINGS: Final[str] = "docker_api_proxy_settings"
2222

2323

24-
def get_remote_docker_client_main_lifespan(
25-
settings: DockerApiProxysettings,
26-
) -> dict[str, Any]:
24+
def get_remote_docker_client_main_lifespan(settings: DockerApiProxysettings) -> State:
2725
return {_DOCKER_API_PROXY_SETTINGS: settings}
2826

2927

packages/service-library/src/servicelib/fastapi/prometheus_instrumentation.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# pylint: disable=protected-access
22

33
from collections.abc import AsyncIterator
4-
from typing import Any, Final
4+
from typing import Final
55

66
from fastapi import FastAPI
77
from fastapi_lifespan_manager import State
@@ -57,9 +57,7 @@ def _on_shutdown() -> None:
5757
_PROMETHEUS_INSTRUMENTATION_ENABLED: Final[str] = "prometheus_instrumentation_enabled"
5858

5959

60-
def get_prometheus_instrumentationmain_main_lifespan(
61-
*, enabled: bool
62-
) -> dict[str, Any]:
60+
def get_prometheus_instrumentationmain_main_lifespan(*, enabled: bool) -> State:
6361
return {_PROMETHEUS_INSTRUMENTATION_ENABLED: enabled}
6462

6563

0 commit comments

Comments
 (0)