Skip to content

Commit 8fea9cc

Browse files
committed
fix: mypy errors
1 parent 9b56918 commit 8fea9cc

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/uipath/runtime/logging/_interceptor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,10 @@ def _redirect_stdout_stderr(self) -> None:
170170
self._clean_all_handlers(stderr_logger)
171171

172172
# Use the min_level in the LoggerWriter to filter messages
173-
sys.stdout = LoggerWriter( # type: ignore[assignment]
173+
sys.stdout = LoggerWriter(
174174
stdout_logger, logging.INFO, self.numeric_min_level, self.original_stdout
175175
)
176-
sys.stderr = LoggerWriter( # type: ignore[assignment]
176+
sys.stderr = LoggerWriter(
177177
stderr_logger, logging.ERROR, self.numeric_min_level, self.original_stderr
178178
)
179179

File renamed without changes.

src/uipath/runtime/tracing/processors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Custom span processors for UiPath execution tracing."""
22

3-
from typing import Optional
3+
from typing import Optional, cast
44

55
from opentelemetry import context as context_api
66
from opentelemetry import trace
@@ -18,9 +18,9 @@ def on_start(
1818
"""Called when a span is started."""
1919
parent_span: Optional[Span]
2020
if parent_context:
21-
parent_span = trace.get_current_span(parent_context)
21+
parent_span = cast(Span, trace.get_current_span(parent_context))
2222
else:
23-
parent_span = trace.get_current_span()
23+
parent_span = cast(Span, trace.get_current_span())
2424

2525
if parent_span and parent_span.is_recording():
2626
execution_id = parent_span.attributes.get("execution.id")

0 commit comments

Comments
 (0)