Skip to content

Commit

Permalink
modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
cartertinney committed Jan 23, 2024
1 parent 281176a commit ca28940
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# --------------------------------------------------------------------------
"""This module contains abstract classes for the various clients of the Azure IoT Hub Device SDK
"""
from __future__ import annotations
from __future__ import annotations # Needed for annotation bug < 3.10
import abc
import logging
import threading
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""This module contains user-facing asynchronous clients for the
Azure IoTHub Device SDK for Python.
"""
from __future__ import annotations
from __future__ import annotations # Needed for annotation bug < 3.10
import logging
import asyncio
import deprecation
Expand Down
2 changes: 1 addition & 1 deletion azure-iot-device/azure/iot/device/iothub/sync_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""This module contains user-facing synchronous clients for the
Azure IoTHub Device SDK for Python.
"""
from __future__ import annotations
from __future__ import annotations # Needed for annotation bug < 3.10
import logging
import deprecation
from .abstract_clients import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Device SDK. This client uses Symmetric Key and X509 authentication to register devices with an
IoT Hub via the Device Provisioning Service.
"""
from __future__ import annotations
from __future__ import annotations # Needed for annotation bug < 3.10
import logging
from typing import Any
from azure.iot.device.common import async_adapter
Expand All @@ -27,7 +27,7 @@
logger = logging.getLogger(__name__)


async def handle_result(callback: FunctionOrCoroutine[[Any], None]) -> None:
async def handle_result(callback: FunctionOrCoroutine[[Any], Any]) -> Any:
try:
return await callback.completion()
except pipeline_exceptions.ConnectionDroppedError as e:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ class RegistrationResult(object):
from the provisioning service.
"""

def __init__(self, operation_id: str, status: str, registration_state: Optional[RegistrationState] = None):
def __init__(
self, operation_id: str, status: str, registration_state: Optional[RegistrationState] = None
):
"""
:param operation_id: The id of the operation as returned by the initial registration request.
:param status: The status of the registration process.
Expand All @@ -114,7 +116,7 @@ def status(self) -> str:
return self._status

@property
def registration_state(self) -> RegistrationState:
def registration_state(self) -> Optional[RegistrationState]:
return self._registration_state

def __str__(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Device SDK. This client uses Symmetric Key and X509 authentication to register devices with an
IoT Hub via the Device Provisioning Service.
"""
from __future__ import annotations
from __future__ import annotations # Needed for annotation bug < 3.10
import logging
from typing import Any
from azure.iot.device.common.evented_callback import EventedCallback
Expand Down

0 comments on commit ca28940

Please sign in to comment.