Skip to content

Commit fde3d59

Browse files
committed
mypy
1 parent f22be7c commit fde3d59

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/isolate/connections/_local/_base.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
Any,
1313
Generic,
1414
Iterator,
15+
Optional,
1516
TypeVar,
1617
)
1718

@@ -197,7 +198,7 @@ def infer_log_level(self, line: str, source: LogSource) -> LogLevel:
197198
return LogLevel.INFO
198199

199200
def handle_agent_log(
200-
self, line: str, *, level: LogLevel | None, source: LogSource
201+
self, line: str, *, level: Optional[LogLevel], source: LogSource
201202
) -> None:
202203
"""Handle a log line emitted by the agent process. The level will be either
203204
STDOUT or STDERR."""

src/isolate/connections/grpc/_base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from contextlib import contextmanager
33
from dataclasses import dataclass
44
from pathlib import Path
5-
from typing import Any, ContextManager, Iterator, List, Tuple, Union, cast
5+
from typing import Any, ContextManager, Iterator, List, Optional, Tuple, Union, cast
66

77
import grpc
88

@@ -148,6 +148,6 @@ def get_python_cmd(
148148
]
149149

150150
def handle_agent_log(
151-
self, line: str, *, level: LogLevel | None, source: LogSource
151+
self, line: str, *, level: Optional[LogLevel], source: LogSource
152152
) -> None:
153153
self.log(line, level=level or self.infer_log_level(line, source), source=source)

src/isolate/connections/ipc/_base.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
Any,
1414
Callable,
1515
ContextManager,
16+
Optional,
1617
)
1718

1819
from isolate.backends import (
@@ -220,6 +221,6 @@ def get_python_cmd(
220221
]
221222

222223
def handle_agent_log(
223-
self, line: str, *, level: LogLevel | None, source: LogSource
224+
self, line: str, *, level: Optional[LogLevel], source: LogSource
224225
) -> None:
225226
self.log(line, level=level or self.infer_log_level(line, source), source=source)

0 commit comments

Comments
 (0)