Skip to content

Commit 468de41

Browse files
author
Jim Bennett
committed
Removing rogue commas to make the PR easier to read
1 parent a7dd16c commit 468de41

File tree

5 files changed

+9
-22
lines changed

5 files changed

+9
-22
lines changed

adafruit_azureiot/iotcentral_device.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def device_twin_desired_updated(self, desired_property_name: str, desired_proper
7575
# when a desired property changes, update the reported to match to keep them in sync
7676
self.send_property(desired_property_name, desired_property_value)
7777

78-
def device_twin_reported_updated(self, reported_property_name: str, reported_property_value, reported_version: int,) -> None:
78+
def device_twin_reported_updated(self, reported_property_name: str, reported_property_value, reported_version: int) -> None:
7979
"""Called when the device twin reported values are updated
8080
:param str reported_property_name: The name of the reported property that was updated
8181
:param reported_property_value: The value of the reported property that was updated
@@ -86,9 +86,7 @@ def device_twin_reported_updated(self, reported_property_name: str, reported_pro
8686
self.on_property_changed(reported_property_name, reported_property_value, reported_version)
8787

8888
# pylint: disable=R0913
89-
def __init__(
90-
self, socket, iface, id_scope: str, device_id: str, key: str, token_expires: int = 21600, logger: logging = None,
91-
):
89+
def __init__(self, socket, iface, id_scope: str, device_id: str, key: str, token_expires: int = 21600, logger: logging = None):
9290
"""Create the Azure IoT Central device client
9391
:param socket: The network socket
9492
:param iface: The network interface
@@ -138,7 +136,7 @@ def connect(self) -> None:
138136

139137
token_expiry = int(time.time() + self._token_expires)
140138
hostname = self._device_registration.register_device(token_expiry)
141-
self._mqtt = IoTMQTT(self, self._socket, self._iface, hostname, self._device_id, self._key, self._token_expires, self._logger,)
139+
self._mqtt = IoTMQTT(self, self._socket, self._iface, hostname, self._device_id, self._key, self._token_expires, self._logger)
142140

143141
self._mqtt.connect()
144142
self._mqtt.subscribe_to_twins()

adafruit_azureiot/iothub_device.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def device_twin_desired_updated(self, desired_property_name: str, desired_proper
118118
# pylint: disable=E1102
119119
self._on_device_twin_desired_updated(desired_property_name, desired_property_value, desired_version)
120120

121-
def device_twin_reported_updated(self, reported_property_name: str, reported_property_value, reported_version: int,) -> None:
121+
def device_twin_reported_updated(self, reported_property_name: str, reported_property_value, reported_version: int) -> None:
122122
"""Called when the device twin reported values are updated
123123
:param str reported_property_name: The name of the reported property that was updated
124124
:param reported_property_value: The value of the reported property that was updated
@@ -128,9 +128,7 @@ def device_twin_reported_updated(self, reported_property_name: str, reported_pro
128128
# pylint: disable=E1102
129129
self._on_device_twin_reported_updated(reported_property_name, reported_property_value, reported_version)
130130

131-
def __init__(
132-
self, socket, iface, device_connection_string: str, token_expires: int = 21600, logger: logging = None,
133-
):
131+
def __init__(self, socket, iface, device_connection_string: str, token_expires: int = 21600, logger: logging = None):
134132
"""Create the Azure IoT Central device client
135133
:param socket: The network socket
136134
:param iface: The network interface
@@ -269,7 +267,7 @@ def connect(self) -> None:
269267
:raises RuntimeError: if the internet connection is not responding or is unable to connect
270268
"""
271269
self._mqtt = IoTMQTT(
272-
self, self._socket, self._iface, self._hostname, self._device_id, self._shared_access_key, self._token_expires, self._logger,
270+
self, self._socket, self._iface, self._hostname, self._device_id, self._shared_access_key, self._token_expires, self._logger
273271
)
274272
self._mqtt.connect()
275273

docs/conf.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@
2121
# Uncomment the below if you use native CircuitPython modules such as
2222
# digitalio, micropython and busio. List the modules you use. Without it, the
2323
# autodoc module docs will fail to generate with a warning.
24-
autodoc_mock_imports = [
25-
"adafruit_logging",
26-
"adafruit_requests",
27-
"adafruit_hashlib",
28-
"adafruit_ntp",
29-
]
24+
autodoc_mock_imports = ["adafruit_logging", "adafruit_requests", "adafruit_hashlib", "adafruit_ntp"]
3025

3126

3227
intersphinx_mapping = {

examples/iotcentral_properties.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,7 @@
100100
# Properties can be updated either in code, or by adding a form to the view
101101
# in the device template, and setting the value on the dashboard for the device
102102
def property_changed(property_name, property_value, version):
103-
print(
104-
"Property", property_name, "updated to", str(property_value), "version", str(version),
105-
)
103+
print("Property", property_name, "updated to", str(property_value), "version", str(version))
106104

107105

108106
# Subscribe to the property changed event

examples/iothub_twin_operations.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@
9999
# or in the Azure portal by selecting the device in the IoT Hub blade, selecting
100100
# Device Twin then adding or amending an entry in the 'desired' section
101101
def device_twin_desired_updated(desired_property_name: str, desired_property_value, desired_version: int):
102-
print(
103-
"Property", desired_property_name, "updated to", str(desired_property_value), "version", desired_version,
104-
)
102+
print("Property", desired_property_name, "updated to", str(desired_property_value), "version", desired_version)
105103

106104

107105
# Subscribe to the device twin desired property updated event

0 commit comments

Comments
 (0)