We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 17624b0 commit 1267f82Copy full SHA for 1267f82
1 file changed
src/a2a/utils/telemetry.py
@@ -62,6 +62,12 @@ def internal_method(self):
62
from typing import TYPE_CHECKING, Any
63
64
65
+try:
66
+ from typing import Self
67
+except ImportError: # pragma: no cover - for Python < 3.11
68
+ from typing_extensions import Self
69
+
70
71
if TYPE_CHECKING:
72
from opentelemetry.trace import SpanKind as SpanKindType
73
else:
@@ -86,7 +92,7 @@ class _NoOp:
86
92
def __call__(self, *args: Any, **kwargs: Any) -> Any:
87
93
return self
88
94
89
- def __enter__(self) -> '_NoOp':
95
+ def __enter__(self) -> Self:
90
96
91
97
98
def __exit__(self, *args: object, **kwargs: Any) -> None:
0 commit comments