From d3aec55f8111a8c632948f43ce893a218c266843 Mon Sep 17 00:00:00 2001 From: Xiang Yan Date: Fri, 2 Aug 2019 16:06:12 -0700 Subject: [PATCH] Mypy fixes --- sdk/core/azure-core/azure/core/polling/poller.py | 2 +- sdk/core/azure-core/azure/core/tracing/decorator.py | 6 +++--- sdk/core/azure-core/azure/core/tracing/decorator_async.py | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sdk/core/azure-core/azure/core/polling/poller.py b/sdk/core/azure-core/azure/core/polling/poller.py index fe6f1de79f3a..65844358f12d 100644 --- a/sdk/core/azure-core/azure/core/polling/poller.py +++ b/sdk/core/azure-core/azure/core/polling/poller.py @@ -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 diff --git a/sdk/core/azure-core/azure/core/tracing/decorator.py b/sdk/core/azure-core/azure/core/tracing/decorator.py index 7b6ebb26cf45..bd60bf86b875 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator.py @@ -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 diff --git a/sdk/core/azure-core/azure/core/tracing/decorator_async.py b/sdk/core/azure-core/azure/core/tracing/decorator_async.py index 0719a9c016c3..875fbe34f06d 100644 --- a/sdk/core/azure-core/azure/core/tracing/decorator_async.py +++ b/sdk/core/azure-core/azure/core/tracing/decorator_async.py @@ -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