Skip to content

Commit

Permalink
Fix Flake8 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hmaerki committed Jan 19, 2024
1 parent 0951f54 commit 6b61e8f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion umodbus/asynchronous/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def send_response(self,
:type signed: bool
"""

#print("sending async response...")
# print("sending async response...")
await self._itf.send_response(slave_addr=self.unit_addr,
function_code=self.function,
request_register_addr=self.register_addr,
Expand Down
4 changes: 2 additions & 2 deletions umodbus/asynchronous/modbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async def _process_read_access(self,
"""@see Modbus._process_read_access"""

task = super()._process_read_access(request, reg_type)
#print("async process_read_access task = ", task)
# print("async process_read_access task = ", task)
if task is not None:
await task

Expand All @@ -69,6 +69,6 @@ async def _process_write_access(self,
"""@see Modbus._process_write_access"""

task = super()._process_write_access(request, reg_type)
#print("async process_write_access task = ", task)
# print("async process_write_access task = ", task)
if task is not None:
await task
8 changes: 4 additions & 4 deletions umodbus/asynchronous/serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,15 @@ async def send_response(self,
:type request: AsyncRequest, optional
"""

#print("async RTU: calling send_response()")
# print("async RTU: calling send_response()")
task = super().send_response(slave_addr=slave_addr,
function_code=function_code,
request_register_addr=request_register_addr, # noqa: E501
request_register_qty=request_register_qty,
request_data=request_data,
values=values,
signed=signed)
#print("async RTU: send_response() called, task is:", task)
# print("async RTU: send_response() called, task is:", task)
if task is not None:
await task

Expand All @@ -261,11 +261,11 @@ async def send_exception_response(self,
:type request: AsyncRequest, optional
"""

#print("async RTU: calling send_exception_response()")
# print("async RTU: calling send_exception_response()")
task = super().send_exception_response(slave_addr=slave_addr,
function_code=function_code,
exception_code=exception_code)
#print("async RTU: called send_exception_response(), task is:", task)
# print("async RTU: called send_exception_response(), task is:", task)
if task is not None:
await task

Expand Down
2 changes: 1 addition & 1 deletion umodbus/modbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def _process_read_access(self, request: Request, reg_type: str) \
_cb = self._register_dict[reg_type][address]['on_get_cb']
_cb(reg_type=reg_type, address=address, val=vals)

#print("creating response...", type(self).__name__, "->", type(request).__name__)
# print("creating response...", type(self).__name__, "->", type(request).__name__)
vals = self._create_response(request=request, reg_type=reg_type)
return request.send_response(vals)
else:
Expand Down
4 changes: 2 additions & 2 deletions umodbus/serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,14 @@ def _send(self, modbus_pdu: bytes, slave_addr: int) -> Optional[Awaitable]:
100 # only required at baudrates above 57600, but hey 100us
)

#print("serial::_send -> _post_send()")
# print("serial::_send -> _post_send()")
return self._post_send(sleep_time_us)

def _post_send(self, sleep_time_us: float) -> None:
"""
Sleeps after sending a request, along with other post-send actions.
"""
#print("serial::post_send")
# print("serial::post_send")
time.sleep_us(sleep_time_us)
if self._ctrlPin:
self._ctrlPin.off()
Expand Down

0 comments on commit 6b61e8f

Please sign in to comment.