Skip to content

Commit 213bfeb

Browse files
CoMPaTechbouwew
authored andcommitted
Mark todos and indicate walrus refactor
1 parent 809d5d8 commit 213bfeb

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

plugwise/connections/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def __init__(self, port, parser):
2727
self._writer_thread = None
2828

2929
################################################
30-
### Open connection ###
30+
# Open connection #
3131
################################################
3232

3333
def connect(self) -> bool:
@@ -40,7 +40,7 @@ def _open_connection(self):
4040
"""Placeholder."""
4141

4242
################################################
43-
### Reader ###
43+
# Reader #
4444
################################################
4545

4646
def _reader_start(self, name):
@@ -58,14 +58,14 @@ def _reader_deamon(self):
5858
time.sleep(0.01)
5959
_LOGGER.debug("Reader daemon stopped")
6060

61-
# TODO: function instead of self
61+
# TODO: 20220125 function instead of self
6262
# pylint: disable=no-self-use
6363
def _read_data(self):
6464
"""placeholder."""
6565
return b"0000"
6666

6767
################################################
68-
### Writer ###
68+
# Writer #
6969
################################################
7070

7171
def _writer_start(self, name: str):
@@ -103,7 +103,7 @@ def send(self, message: NodeRequest, callback=None):
103103
self._write_queue.put_nowait((message, callback))
104104

105105
################################################
106-
### Connection state ###
106+
# Connection state #
107107
################################################
108108

109109
def is_connected(self):
@@ -119,7 +119,7 @@ def write_thread_alive(self):
119119
return self._writer_thread.is_alive() if self.run_writer_thread else False
120120

121121
################################################
122-
### Close connection ###
122+
# Close connection #
123123
################################################
124124

125125
def disconnect(self):

plugwise/helper.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,8 @@ def _get_module_data(self, appliance, locator, mod_type):
443443
if appl_search is not None:
444444
link_id = appl_search.attrib["id"]
445445
locator = f".//{mod_type}[@id='{link_id}']...."
446+
# TODO: 20220125 investigate why walrus doesn't play with pylint (module.find = no-member) on
447+
# if (module := self._modules.find(locator)) is not None:
446448
module = self._modules.find(locator)
447449
if module is not None:
448450
v_name = module.find("vendor_name").text

plugwise/messages/responses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def __init__(self):
337337
self.datetime = DateTime()
338338
self.last_logaddr = LogAddr(0, length=8)
339339
self.relay_state = Int(0, length=2)
340-
# TODO: snake-style
340+
# TODO: 20220126 snake-style
341341
# pylint: disable=invalid-name
342342
self.hz = Int(0, length=2)
343343
self.hw_ver = String(None, length=12)

plugwise/nodes/scan.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ def _process_switch_group(self, message):
9797
self.mac,
9898
)
9999

100-
# TODO: snakestyle name
100+
# TODO: 20220125 snakestyle name
101101
# pylint: disable=invalid-name
102102
def CalibrateLight(self, callback=None):
103103
"""Queue request to calibration light sensitivity"""
104104
self._queue_request(ScanLightCalibrateRequest(self._mac), callback)
105105

106-
# TODO: snakestyle name
106+
# TODO: 20220125 snakestyle name
107107
# pylint: disable=invalid-name
108108
def Configure_scan(
109109
self,
@@ -130,7 +130,7 @@ def Configure_scan(
130130
callback,
131131
)
132132

133-
# TODO: snakestyle name
133+
# TODO: 20220125 snakestyle name
134134
# pylint: disable=invalid-name
135135
def SetMotionAction(self, callback=None):
136136
"""Queue Configure Scan to signal motion"""

plugwise/nodes/sed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def _wake_up_interval_accepted(self):
135135
"""Callback after wake up interval is received and accepted by SED."""
136136
self._wake_up_interval = self._new_maintenance_interval
137137

138-
# TODO: snakestyle name
138+
# TODO: 20220125 snakestyle name
139139
# pylint: disable=invalid-name
140140
def Configure_SED(
141141
self,

0 commit comments

Comments
 (0)