Skip to content

Commit 50a59a7

Browse files
committed
Add typing for first argument
1 parent 1e45be1 commit 50a59a7

File tree

1 file changed

+2
-2
lines changed
  • opentelemetry-instrumentation/src/opentelemetry/instrumentation

1 file changed

+2
-2
lines changed

opentelemetry-instrumentation/src/opentelemetry/instrumentation/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from contextlib import contextmanager
1717
from importlib import import_module
1818
from re import escape, sub
19-
from typing import Dict, Iterable, Sequence
19+
from typing import Dict, Iterable, Sequence, Union
2020

2121
from wrapt import ObjectProxy
2222

@@ -81,7 +81,7 @@ def http_status_to_status_code(
8181
return StatusCode.ERROR
8282

8383

84-
def unwrap(obj, attr: str):
84+
def unwrap(obj: Union[object, str], attr: str):
8585
"""Given a function that was wrapped by wrapt.wrap_function_wrapper, unwrap it
8686
8787
The object containing the function to unwrap may be passed as dotted module path string.

0 commit comments

Comments
 (0)