diff --git a/src/qcodes/logger/logger.py b/src/qcodes/logger/logger.py index 62c04427a6c7..a9cf215b8d94 100644 --- a/src/qcodes/logger/logger.py +++ b/src/qcodes/logger/logger.py @@ -33,6 +33,7 @@ ) AzureLogHandler = Any +Envelope = Any log: logging.Logger = logging.getLogger(__name__) @@ -205,11 +206,9 @@ def _create_telemetry_handler() -> "AzureLogHandler": """ Configure, create, and return the telemetry handler """ - if TYPE_CHECKING: - from opencensus.ext.azure.common.protocol import ( # type: ignore[import-untyped] - Envelope, - ) - from opencensus.ext.azure.log_exporter import AzureLogHandler + from opencensus.ext.azure.log_exporter import ( # type: ignore[import-untyped] + AzureLogHandler, + ) global telemetry_handler # The default_custom_dimensions will appear in the "customDimensions"