From 8ca5675626baa5251e278adbe0396affdc2cf89c Mon Sep 17 00:00:00 2001 From: Oliva Kar Date: Wed, 24 Jan 2024 16:43:08 -0800 Subject: [PATCH] wip --- azure-iot-device/azure/iot/device/common/http_transport.py | 2 +- azure-iot-device/azure/iot/device/iothub/abstract_clients.py | 2 +- azure-iot-device/azure/iot/device/iothub/edge_hsm.py | 2 +- azure-iot-device/azure/iot/device/iothub/sync_clients.py | 2 +- azure-iot-device/azure/iot/device/patch.py | 2 +- .../provisioning/abstract_provisioning_device_client.py | 2 +- .../azure/iot/device/provisioning/pipeline/exceptions.py | 4 ++-- .../iot/device/provisioning/provisioning_device_client.py | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/azure-iot-device/azure/iot/device/common/http_transport.py b/azure-iot-device/azure/iot/device/common/http_transport.py index 26fffda2c..d09629f0e 100644 --- a/azure-iot-device/azure/iot/device/common/http_transport.py +++ b/azure-iot-device/azure/iot/device/common/http_transport.py @@ -6,7 +6,7 @@ import logging import ssl -import requests # type: ignore +import requests # type: ignore from . import transport_exceptions as exceptions from .pipeline import pipeline_thread diff --git a/azure-iot-device/azure/iot/device/iothub/abstract_clients.py b/azure-iot-device/azure/iot/device/iothub/abstract_clients.py index cec549882..747e93b36 100644 --- a/azure-iot-device/azure/iot/device/iothub/abstract_clients.py +++ b/azure-iot-device/azure/iot/device/iothub/abstract_clients.py @@ -24,7 +24,7 @@ from . import edge_hsm from .pipeline import MQTTPipeline, HTTPPipeline from typing_extensions import Self -from azure.iot.device.custom_typing import FunctionOrCoroutine, JSONSerializable, Twin, TwinPatch +from azure.iot.device.custom_typing import FunctionOrCoroutine, Twin, TwinPatch from typing import Any, Dict, List, Optional, Union logger = logging.getLogger(__name__) diff --git a/azure-iot-device/azure/iot/device/iothub/edge_hsm.py b/azure-iot-device/azure/iot/device/iothub/edge_hsm.py index a82d273d6..4c23beabb 100644 --- a/azure-iot-device/azure/iot/device/iothub/edge_hsm.py +++ b/azure-iot-device/azure/iot/device/iothub/edge_hsm.py @@ -7,7 +7,7 @@ import logging import json import base64 -import requests # type: ignore +import requests # type: ignore import requests_unixsocket import urllib from azure.iot.device.common.auth.signing_mechanism import SigningMechanism diff --git a/azure-iot-device/azure/iot/device/iothub/sync_clients.py b/azure-iot-device/azure/iot/device/iothub/sync_clients.py index 89690f39b..4088e0b6f 100644 --- a/azure-iot-device/azure/iot/device/iothub/sync_clients.py +++ b/azure-iot-device/azure/iot/device/iothub/sync_clients.py @@ -26,7 +26,7 @@ from azure.iot.device import constant as device_constant from .pipeline import MQTTPipeline, HTTPPipeline from azure.iot.device.custom_typing import FunctionOrCoroutine, StorageInfo, Twin, TwinPatch -from typing import Any, Dict, List, Optional, Set, Union +from typing import Optional, Union logger = logging.getLogger(__name__) diff --git a/azure-iot-device/azure/iot/device/patch.py b/azure-iot-device/azure/iot/device/patch.py index 9552338ec..3b76a4097 100644 --- a/azure-iot-device/azure/iot/device/patch.py +++ b/azure-iot-device/azure/iot/device/patch.py @@ -13,7 +13,7 @@ # This dict will be used as a scope for imports and defs in add_shims_for_inherited_methods # in order to keep them out of the global scope of this module. -shim_scope : Dict[str, str]= {} +shim_scope : Dict[str, str] = {} def add_shims_for_inherited_methods(target_class): diff --git a/azure-iot-device/azure/iot/device/provisioning/abstract_provisioning_device_client.py b/azure-iot-device/azure/iot/device/provisioning/abstract_provisioning_device_client.py index fb7ab0811..6ce83d23e 100644 --- a/azure-iot-device/azure/iot/device/provisioning/abstract_provisioning_device_client.py +++ b/azure-iot-device/azure/iot/device/provisioning/abstract_provisioning_device_client.py @@ -11,7 +11,7 @@ import abc import logging from typing_extensions import Self -from typing import Any, Dict, List, Optional, Union +from typing import Any, Dict, List, Optional from azure.iot.device.provisioning import pipeline from azure.iot.device.common.auth import sastoken as st diff --git a/azure-iot-device/azure/iot/device/provisioning/pipeline/exceptions.py b/azure-iot-device/azure/iot/device/provisioning/pipeline/exceptions.py index 672089284..52cc5e9db 100644 --- a/azure-iot-device/azure/iot/device/provisioning/pipeline/exceptions.py +++ b/azure-iot-device/azure/iot/device/provisioning/pipeline/exceptions.py @@ -8,14 +8,14 @@ # For now, present relevant transport errors as part of the Pipeline API surface # so that they do not have to be duplicated at this layer. # OK TODO This mimics the IotHub Case. Both IotHub and Provisioning needs to change -from azure.iot.device.common.pipeline.pipeline_exceptions import ( +from azure.iot.device.common.pipeline.pipeline_exceptions import ( # noqa: F401, F403 PipelineException, OperationCancelled, OperationTimeout, OperationError, PipelineNotRunning, PipelineRuntimeError -) # noqa: F401, F403 +) from azure.iot.device.common.transport_exceptions import ( # noqa: F401 ConnectionFailedError, ConnectionDroppedError, diff --git a/azure-iot-device/azure/iot/device/provisioning/provisioning_device_client.py b/azure-iot-device/azure/iot/device/provisioning/provisioning_device_client.py index 3b4a94c3b..7ba535233 100644 --- a/azure-iot-device/azure/iot/device/provisioning/provisioning_device_client.py +++ b/azure-iot-device/azure/iot/device/provisioning/provisioning_device_client.py @@ -10,7 +10,7 @@ """ from __future__ import annotations # Needed for annotation bug < 3.10 import logging -from typing import Any, Union +from typing import Any from azure.iot.device.common.evented_callback import EventedCallback from azure.iot.device.custom_typing import FunctionOrCoroutine from .abstract_provisioning_device_client import AbstractProvisioningDeviceClient