Skip to content

Commit fcb180f

Browse files
committed
Reformatted per pre-commit
1 parent 04efe51 commit fcb180f

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

adafruit_ble_broadcastnet.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@
3333
_sequence_number = 0 # pylint: disable=invalid-name
3434

3535

36-
def broadcast(measurement: 'AdafruitSensorMeasurement', *, broadcast_time: float = 0.1, extended: bool = False) -> None:
36+
def broadcast(
37+
measurement: "AdafruitSensorMeasurement",
38+
*,
39+
broadcast_time: float = 0.1,
40+
extended: bool = False
41+
) -> None:
3742
"""Broadcasts the given measurement for the given broadcast time. If extended is False and the
3843
measurement would be too long, it will be split into multiple measurements for transmission,
3944
each with the given broadcast time.
@@ -156,7 +161,9 @@ class AdafruitSensorMeasurement(Advertisement):
156161
"""Battery voltage in millivolts. Saves two bytes over voltage and is more readable in bare
157162
packets."""
158163

159-
def __init__(self, *, entry: Optional[ScanEntry] = None, sequence_number: int = 0) -> None:
164+
def __init__(
165+
self, *, entry: Optional[ScanEntry] = None, sequence_number: int = 0
166+
) -> None:
160167
super().__init__(entry=entry)
161168
if entry:
162169
return
@@ -172,7 +179,7 @@ def __str__(self) -> str:
172179
parts.append("{}={}".format(attr, str(value)))
173180
return "<{} {} >".format(self.__class__.__name__, " ".join(parts))
174181

175-
def split(self, max_packet_size: int = 31) -> 'AdafruitSensorMeasurement':
182+
def split(self, max_packet_size: int = 31) -> "AdafruitSensorMeasurement":
176183
"""Split the measurement into multiple measurements with the given max_packet_size. Yields
177184
each submeasurement."""
178185
current_size = 8 # baseline for mfg data and sequence number

0 commit comments

Comments
 (0)