diff --git a/pyrightconfig.stricter.json b/pyrightconfig.stricter.json index 2b724712154b..d786187aab12 100644 --- a/pyrightconfig.stricter.json +++ b/pyrightconfig.stricter.json @@ -66,7 +66,6 @@ "stubs/networkx", "stubs/oauthlib", "stubs/openpyxl", - "stubs/opentracing/opentracing/span.pyi", "stubs/paramiko/paramiko/_winapi.pyi", "stubs/parsimonious/parsimonious/nodes.pyi", "stubs/peewee", diff --git a/stubs/opentracing/opentracing/mocktracer/span.pyi b/stubs/opentracing/opentracing/mocktracer/span.pyi index 229af11b8e16..eb15f3f125b8 100644 --- a/stubs/opentracing/opentracing/mocktracer/span.pyi +++ b/stubs/opentracing/opentracing/mocktracer/span.pyi @@ -8,7 +8,7 @@ from .tracer import MockTracer class MockSpan(Span): operation_name: str | None - start_time: Any + start_time: float | None parent_id: int | None tags: dict[str, Any] finish_time: float @@ -34,5 +34,5 @@ class MockSpan(Span): class LogData: key_values: dict[str, Any] - timestamp: float | None + timestamp: float def __init__(self, key_values: dict[str, Any], timestamp: float | None = None) -> None: ... diff --git a/stubs/opentracing/opentracing/scope_managers/__init__.pyi b/stubs/opentracing/opentracing/scope_managers/__init__.pyi index 2b0f720c3ad9..3d379c6b0b31 100644 --- a/stubs/opentracing/opentracing/scope_managers/__init__.pyi +++ b/stubs/opentracing/opentracing/scope_managers/__init__.pyi @@ -6,4 +6,4 @@ class ThreadLocalScopeManager(ScopeManager): def __init__(self) -> None: ... def activate(self, span: Span, finish_on_close: bool) -> Scope: ... @property - def active(self) -> Scope: ... + def active(self) -> Scope | None: ... diff --git a/stubs/opentracing/opentracing/scope_managers/asyncio.pyi b/stubs/opentracing/opentracing/scope_managers/asyncio.pyi index 4b96d7883fda..a0a6cba3d573 100644 --- a/stubs/opentracing/opentracing/scope_managers/asyncio.pyi +++ b/stubs/opentracing/opentracing/scope_managers/asyncio.pyi @@ -5,4 +5,4 @@ from ..span import Span class AsyncioScopeManager(ThreadLocalScopeManager): def activate(self, span: Span, finish_on_close: bool) -> Scope: ... @property - def active(self) -> Scope: ... + def active(self) -> Scope | None: ... diff --git a/stubs/opentracing/opentracing/scope_managers/contextvars.pyi b/stubs/opentracing/opentracing/scope_managers/contextvars.pyi index 990045ee4c56..729cc963bba4 100644 --- a/stubs/opentracing/opentracing/scope_managers/contextvars.pyi +++ b/stubs/opentracing/opentracing/scope_managers/contextvars.pyi @@ -5,6 +5,6 @@ from ..span import Span class ContextVarsScopeManager(ScopeManager): def activate(self, span: Span, finish_on_close: bool) -> Scope: ... @property - def active(self) -> Scope: ... + def active(self) -> Scope | None: ... def no_parent_scope() -> None: ... diff --git a/stubs/opentracing/opentracing/scope_managers/gevent.pyi b/stubs/opentracing/opentracing/scope_managers/gevent.pyi index 6b835cd9787d..8675da655642 100644 --- a/stubs/opentracing/opentracing/scope_managers/gevent.pyi +++ b/stubs/opentracing/opentracing/scope_managers/gevent.pyi @@ -5,4 +5,4 @@ from ..span import Span class GeventScopeManager(ScopeManager): def activate(self, span: Span, finish_on_close: bool) -> Scope: ... @property - def active(self) -> Scope: ... + def active(self) -> Scope | None: ... diff --git a/stubs/opentracing/opentracing/scope_managers/tornado.pyi b/stubs/opentracing/opentracing/scope_managers/tornado.pyi index 59b1cab9cf50..27a4b86c574e 100644 --- a/stubs/opentracing/opentracing/scope_managers/tornado.pyi +++ b/stubs/opentracing/opentracing/scope_managers/tornado.pyi @@ -7,7 +7,7 @@ from ..span import Span class TornadoScopeManager(ThreadLocalScopeManager): def activate(self, span: Span, finish_on_close: bool) -> Scope: ... @property - def active(self) -> Scope: ... + def active(self) -> Scope | None: ... class ThreadSafeStackContext: contexts: Any diff --git a/stubs/opentracing/opentracing/span.pyi b/stubs/opentracing/opentracing/span.pyi index dd9bff361ef7..2f045476f5b2 100644 --- a/stubs/opentracing/opentracing/span.pyi +++ b/stubs/opentracing/opentracing/span.pyi @@ -25,5 +25,5 @@ class Span: def __exit__( self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None ) -> None: ... - def log_event(self, event: Any, payload=None) -> Self: ... + def log_event(self, event: Any, payload: Any = None) -> Self: ... def log(self, **kwargs: Any) -> Self: ...