Skip to content

Commit 76a7d21

Browse files
committed
Clean.
1 parent 25aff40 commit 76a7d21

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

pymodbus/bit_read_message.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __str__(self):
5858

5959
class ReadBitsResponseBase(ModbusResponse):
6060
"""Base class for Messages responding to bit-reading values.
61-
61+
6262
The requested bits can be found in the .bits list.
6363
"""
6464

@@ -174,6 +174,7 @@ class ReadCoilsResponse(ReadBitsResponseBase):
174174
175175
The requested coils can be found in boolean form in the .bits list.
176176
"""
177+
177178
function_code = 1
178179

179180
def __init__(self, values=None, **kwargs):
@@ -236,6 +237,7 @@ class ReadDiscreteInputsResponse(ReadBitsResponseBase):
236237
237238
The requested coils can be found in boolean form in the .bits list.
238239
"""
240+
239241
function_code = 2
240242

241243
def __init__(self, values=None, **kwargs):

pymodbus/client/asynchronous/async_io/__init__.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ def data_received(self, data):
7777
"""
7878
self._data_received(data)
7979

80-
def create_future(self):
81-
"""Helper function to create asyncio Future object
80+
def create_future(self): # pylint: disable=no-self-use
81+
"""Help function to create asyncio Future object.
8282
8383
:return:
8484
"""
8585
return asyncio.Future()
8686

87-
def resolve_future(self, my_future, result):
88-
"""Resolves the completed future and sets the result
87+
def resolve_future(self, my_future, result): # pylint: disable=no-self-use
88+
"""Resolve the completed future and sets the result.
8989
9090
:param my_future:
9191
:param result:
@@ -94,9 +94,8 @@ def resolve_future(self, my_future, result):
9494
if not my_future.done():
9595
my_future.set_result(result)
9696

97-
def raise_future(self, my_future, exc):
98-
"""
99-
Sets exception of a future if not done
97+
def raise_future(self, my_future, exc): # pylint: disable=no-self-use
98+
"""Set exception of a future if not done.
10099
101100
:param my_future:
102101
:param exc:
@@ -644,7 +643,7 @@ def __init__(self, host=None, port=502, protocol_class=None, loop=None, **kwargs
644643

645644
def stop(self):
646645
"""Stop connection.
647-
646+
648647
:return:
649648
"""
650649
# prevent reconnect:

pymodbus/client/sync.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class BaseModbusClient(ModbusClientMixin):
3636
Derived classes simply need to implement the transport methods and set the correct
3737
framer.
3838
"""
39+
3940
def __init__(self, framer, **kwargs):
4041
"""Initialize a client instance.
4142
@@ -160,7 +161,7 @@ def _dump(self, data):
160161
_logger.exception(exc)
161162

162163
def register(self, function):
163-
"""Registers a function and sub function class with the decoder
164+
"""Register a function and sub function class with the decoder.
164165
165166
:param function: Custom function class to register
166167
:return:

pymodbus/register_read_message.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ class ReadHoldingRegistersResponse(ReadRegistersResponseBase):
148148
149149
The requested registers can be found in the .registers list.
150150
"""
151+
151152
function_code = 3
152153

153154
def __init__(self, values=None, **kwargs):
@@ -203,6 +204,7 @@ class ReadInputRegistersResponse(ReadRegistersResponseBase):
203204
204205
The requested registers can be found in the .registers list.
205206
"""
207+
206208
function_code = 4
207209

208210
def __init__(self, values=None, **kwargs):
@@ -341,6 +343,7 @@ class ReadWriteMultipleRegistersResponse(ModbusResponse):
341343
342344
The requested registers can be found in the .registers list.
343345
"""
346+
344347
function_code = 23
345348
_rtu_byte_count_pos = 2
346349

0 commit comments

Comments
 (0)