We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a035462 commit f2bb361Copy full SHA for f2bb361
1 file changed
opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/instrument.py
@@ -22,9 +22,11 @@
22
Generator,
23
Iterable,
24
List,
25
+ Protocol,
26
Sequence,
27
Union,
28
cast,
29
+ runtime_checkable,
30
)
31
32
# This kind of import is needed to avoid Sphinx errors.
@@ -63,7 +65,8 @@
63
65
64
66
67
-class _Instrument:
68
+@runtime_checkable
69
+class _Instrument(Protocol):
70
name: str
71
unit: str
72
description: str
0 commit comments