Skip to content

Commit 40a0c71

Browse files
committed
Cleanup
1 parent 283afaf commit 40a0c71

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

plugwise_usb/helpers/util.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
def validate_mac(mac: str) -> bool:
14-
"""Validate the supplied string to be an MAC address."""
14+
"""Validate the supplied string is in a MAC address format."""
1515
if not re.match("^[A-F0-9]+$", mac):
1616
return False
1717
try:
@@ -25,7 +25,6 @@ def version_to_model(version: str | None) -> str:
2525
"""Translate hardware_version to device type."""
2626
if version is None:
2727
return "Unknown"
28-
2928
model = HW_MODELS.get(version)
3029
if model is None:
3130
model = HW_MODELS.get(version[4:10])

plugwise_usb/messages/requests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def retries_left(self) -> int:
320320
@property
321321
def resend(self) -> bool:
322322
"""Return true if retry counter is not reached yet."""
323-
return (self._max_retries > self._send_counter)
323+
return self._max_retries > self._send_counter
324324

325325
def add_send_attempt(self) -> None:
326326
"""Increase the number of retries."""

0 commit comments

Comments
 (0)