Skip to content

Commit f9b4823

Browse files
committed
Changed typehint to strings to avoid errors when OTEL not installed
1 parent ee8c878 commit f9b4823

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

google/cloud/spanner_v1/metrics/metrics_tracer.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,21 +177,21 @@ class should not have any knowledge about the observability framework used for m
177177
"""
178178

179179
_client_attributes: Dict[str, str]
180-
_instrument_attempt_counter: Counter
181-
_instrument_attempt_latency: Histogram
182-
_instrument_operation_counter: Counter
183-
_instrument_operation_latency: Histogram
180+
_instrument_attempt_counter: "Counter"
181+
_instrument_attempt_latency: "Histogram"
182+
_instrument_operation_counter: "Counter"
183+
_instrument_operation_latency: "Histogram"
184184
current_op: MetricOpTracer
185185
enabled: bool
186186
method: str
187187

188188
def __init__(
189189
self,
190190
enabled: bool,
191-
instrument_attempt_latency: Histogram,
192-
instrument_attempt_counter: Counter,
193-
instrument_operation_latency: Histogram,
194-
instrument_operation_counter: Counter,
191+
instrument_attempt_latency: "Histogram",
192+
instrument_attempt_counter: "Counter",
193+
instrument_operation_latency: "Histogram",
194+
instrument_operation_counter: "Counter",
195195
client_attributes: Dict[str, str],
196196
):
197197
"""

0 commit comments

Comments
 (0)