Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/core/azure-core/azure/core/polling/poller.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def result(self, timeout=None):
if one is available.
:raises CloudError: Server problem with the query.
"""
self.wait(timeout)
self.wait(timeout) # type: ignore
return self._polling_method.resource()

@distributed_trace
Expand Down
6 changes: 3 additions & 3 deletions sdk/core/azure-core/azure/core/tracing/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ def wrapper_use_tracer(*args, **kwargs):
ans = None
if parent_span is not None and orig_wrapped_span is None:
common.set_span_contexts(parent_span)
name = name_of_span or common.get_function_and_class_name(func, *args)
name = name_of_span or common.get_function_and_class_name(func, *args) # type: ignore
child = parent_span.span(name=name)
child.start()
common.set_span_contexts(child)
ans = func(*args, **kwargs)
ans = func(*args, **kwargs) # type: ignore
child.finish()
common.set_span_contexts(parent_span)
if orig_wrapped_span is None and passed_in_parent is None and original_span_instance is None:
parent_span.finish()
common.set_span_contexts(orig_wrapped_span, span_instance=original_span_instance)
else:
ans = func(*args, **kwargs)
ans = func(*args, **kwargs) # type: ignore
return ans

return wrapper_use_tracer
6 changes: 3 additions & 3 deletions sdk/core/azure-core/azure/core/tracing/decorator_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ async def wrapper_use_tracer(*args, **kwargs):
ans = None
if parent_span is not None and orig_wrapped_span is None:
common.set_span_contexts(parent_span)
name = name_of_span or common.get_function_and_class_name(func, *args)
name = name_of_span or common.get_function_and_class_name(func, *args) # type: ignore
child = parent_span.span(name=name)
child.start()
common.set_span_contexts(child)
ans = await func(*args, **kwargs)
ans = await func(*args, **kwargs) # type: ignore
child.finish()
common.set_span_contexts(parent_span)
if orig_wrapped_span is None and passed_in_parent is None and original_span_instance is None:
parent_span.finish()
common.set_span_contexts(orig_wrapped_span, span_instance=original_span_instance)
else:
ans = await func(*args, **kwargs)
ans = await func(*args, **kwargs) # type: ignore
return ans

return wrapper_use_tracer