Skip to content

Commit d54c6ea

Browse files
committed
fix: use Self type in _NoOp.__enter__ to satisfy PYI034
Signed-off-by: Luca Muscariello <muscariello@ieee.org>
1 parent 80df0b6 commit d54c6ea

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/a2a/utils/telemetry.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ def internal_method(self):
6161
from collections.abc import Callable
6262
from typing import TYPE_CHECKING, Any
6363

64+
from typing_extensions import Self
65+
6466

6567
if TYPE_CHECKING:
6668
from opentelemetry.trace import SpanKind as SpanKindType
@@ -86,7 +88,7 @@ class _NoOp:
8688
def __call__(self, *args: Any, **kwargs: Any) -> Any:
8789
return self
8890

89-
def __enter__(self) -> '_NoOp':
91+
def __enter__(self) -> Self:
9092
return self
9193

9294
def __exit__(self, *args: object, **kwargs: Any) -> None:

0 commit comments

Comments
 (0)