Skip to content

Commit dd40602

Browse files
committed
Fix type hints
1 parent 080b057 commit dd40602

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/ert/services/_storage_main.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import threading
1212
import time
1313
import warnings
14+
from types import FrameType
1415
from typing import Any
1516

1617
import uvicorn
@@ -87,7 +88,9 @@ def _create_connection_info(sock: socket.socket, authtoken: str) -> dict[str, An
8788

8889

8990
def run_server(
90-
args: argparse.Namespace | None = None, debug: bool = False, uvicorn_config=None
91+
args: argparse.Namespace | None = None,
92+
debug: bool = False,
93+
uvicorn_config: uvicorn.Config | None = None,
9194
) -> None:
9295
if args is None:
9396
args = parse_args()
@@ -154,7 +157,7 @@ def check_parent_alive() -> bool:
154157
os.kill(os.getpid(), signal.SIGTERM)
155158

156159

157-
def main():
160+
def main() -> None:
158161
args = parse_args()
159162
config_args: dict[str, Any] = {}
160163
with open(STORAGE_LOG_CONFIG, encoding="utf-8") as conf_file:
@@ -195,7 +198,7 @@ def main():
195198
terminate_on_parent_death_thread.join()
196199

197200

198-
def sigterm_handler(_signo, _stack_frame):
201+
def sigterm_handler(_signo: int, _stack_frame: FrameType | None) -> None:
199202
sys.exit(0)
200203

201204

src/ert/trace.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def get_trace_id() -> str:
1717

1818

1919
def get_traceparent() -> str | None:
20-
carrier = {}
20+
carrier: dict[str, str] = {}
2121
# Write the current context into the carrier.
2222
TraceContextTextMapPropagator().inject(carrier)
2323
return carrier.get("traceparent")

0 commit comments

Comments
 (0)