Skip to content

Commit b7633b0

Browse files
authored
Remove useless pylint disable in "pymodbus". (#843)
1 parent 163025b commit b7633b0

36 files changed

+63
-81
lines changed

pymodbus/bit_read_message.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
--------------------------------------
33
44
"""
5-
# pylint: disable=R0801
65
import struct
76
from pymodbus.pdu import ModbusRequest
87
from pymodbus.pdu import ModbusResponse

pymodbus/bit_write_message.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
44
TODO write mask request/response
55
"""
6-
# pylint: disable=R0801
76
import struct
87
from pymodbus.constants import ModbusStatus
98
from pymodbus.pdu import ModbusRequest

pymodbus/client/asynchronous/async_io/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def write_transport(self, packet):
209209
return self.transport.sendto(packet)
210210

211211

212-
class ReconnectingAsyncioModbusTcpClient: # pylint: disable=too-many-instance-attributes
212+
class ReconnectingAsyncioModbusTcpClient:
213213
""" Client to connect to modbus device repeatedly over TCP/IP. """
214214
#: Minimum delay in milli seconds before reconnect is attempted.
215215
DELAY_MIN_MS = 100
@@ -453,7 +453,7 @@ def _create_protocol(self):
453453
protocol.factory = self
454454
return protocol
455455

456-
class ReconnectingAsyncioModbusUdpClient: # pylint: disable=too-many-instance-attributes
456+
class ReconnectingAsyncioModbusUdpClient:
457457
""" Client to connect to modbus device repeatedly over UDP. """
458458

459459
#: Reconnect delay in milli seconds.
@@ -669,12 +669,12 @@ def protocol_lost_connection(self, protocol):
669669
'callback called while not connected.')
670670

671671

672-
class AsyncioModbusSerialClient: # pylint: disable=too-many-instance-attributes
672+
class AsyncioModbusSerialClient:
673673
""" Client to connect to modbus device over serial. """
674674
transport = None
675675
framer = None
676676

677-
def __init__(self, port, protocol_class=None, framer=None, loop=None, # pylint: disable=too-many-arguments
677+
def __init__(self, port, protocol_class=None, framer=None, loop=None,
678678
baudrate=9600, bytesize=8, parity='N', stopbits=1, **serial_kwargs):
679679
""" Initializes Asyncio Modbus Serial Client
680680
:param port: Port to connect
@@ -772,7 +772,7 @@ async def init_tcp_client(proto_cls, loop, host, port, **kwargs):
772772
return client
773773

774774

775-
async def init_tls_client(proto_cls, loop, host, port, sslctx=None, # pylint: disable=too-many-arguments
775+
async def init_tls_client(proto_cls, loop, host, port, sslctx=None,
776776
server_hostname=None, framer=None, **kwargs):
777777
""" Helper function to initialize tcp client
778778
:param proto_cls:

pymodbus/client/asynchronous/deprecated/asynchronous.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def process():
3131
reactor.callLater(1, process)
3232
reactor.run()
3333
"""
34-
# pylint: disable=R0801
3534
import logging
3635
from twisted.internet import defer, protocol
3736
from twisted.python.failure import Failure

pymodbus/client/asynchronous/factory/serial.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
""" Factory to create asynchronous serial clients based on twisted/tornado/asyncio
22
"""
3-
# pylint: disable=R0801
43
from __future__ import unicode_literals
54
from __future__ import absolute_import
65
import logging

pymodbus/client/asynchronous/factory/tcp.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
""" Factory to create asynchronous tcp clients based on twisted/tornado/asyncio
22
"""
3-
# pylint: disable=R0801
43
from __future__ import unicode_literals
54
from __future__ import absolute_import
65
import logging
@@ -48,7 +47,7 @@ def reactor_factory(host="127.0.0.1", port=Defaults.Port, framer=None, # pylint:
4847
return protocol, deferred
4948

5049

51-
def io_loop_factory(host="127.0.0.1", port=Defaults.Port, framer=None, # pylint: disable=unused-argument
50+
def io_loop_factory(host="127.0.0.1", port=Defaults.Port, framer=None,
5251
source_address=None, timeout=None, **kwargs):
5352
""" Factory to create Tornado based asynchronous tcp clients
5453
:param host: Host IP address

pymodbus/client/asynchronous/factory/tls.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
""" Factory to create asynchronous tls clients based on asyncio. """
2-
# pylint: disable=R0801
32
from __future__ import unicode_literals
43
from __future__ import absolute_import
54
import logging

pymodbus/client/asynchronous/mixins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def __init__(self, framer=None, timeout=2, **kwargs):
3131
class AsyncModbusClientMixin(BaseAsyncModbusClient):
3232
""" Async Modbus client mixing for UDP and TCP clients. """
3333

34-
def __init__(self, host="127.0.0.1", port=Defaults.Port, framer=None, # pylint: disable=too-many-arguments
34+
def __init__(self, host="127.0.0.1", port=Defaults.Port, framer=None,
3535
source_address=None, timeout=None, **kwargs):
3636
""" Initializes a Modbus TCP/UDP asynchronous client
3737
:param host: Host IP address

pymodbus/client/asynchronous/tcp.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"""TCP communication."""
2-
# pylint: disable=R0801
32
from __future__ import unicode_literals
43
from __future__ import absolute_import
54

@@ -17,7 +16,7 @@ class AsyncModbusTCPClient: # pylint: disable=too-few-public-methods
1716
1817
from pymodbus.client.asynchronous.tcp import AsyncModbusTCPClient
1918
"""
20-
def __new__(cls, scheduler, host="127.0.0.1", port=Defaults.Port, # pylint: disable=too-many-arguments
19+
def __new__(cls, scheduler, host="127.0.0.1", port=Defaults.Port,
2120
framer=None, source_address=None, timeout=None, **kwargs):
2221
""" Scheduler to use:
2322
- reactor (Twisted)

pymodbus/client/asynchronous/tornado/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
""" Asynchronous framework adapter for tornado. """
2-
# pylint: disable=R0801
32
from __future__ import unicode_literals
43

54
import abc
@@ -268,7 +267,7 @@ def write_to_fd(self, data):
268267
return None
269268

270269

271-
class AsyncModbusSerialClient(BaseTornadoSerialClient): # pylint: disable=too-many-instance-attributes
270+
class AsyncModbusSerialClient(BaseTornadoSerialClient):
272271
""" Tornado based asynchronous serial client. """
273272

274273
def __init__(self, *args, **kwargs):
@@ -314,7 +313,7 @@ def connect(self):
314313

315314
raise gen.Return(self)
316315

317-
def execute(self, request=None): #NOSONAR pylint: disable=signature-differs,too-complex
316+
def execute(self, request=None): #NOSONAR pylint: disable=too-complex
318317
""" Executes a transaction
319318
:param request: Request to be written on to the bus
320319
:return:
@@ -395,7 +394,7 @@ def _on_receive(fd, events):
395394
txt = f"expected_response_length = {expected_response_length}"
396395
_logger.debug(txt)
397396

398-
#NOSONAR TODO: calculate once # pylint: disable=fixme
397+
#NOSONAR TODO: calculate once
399398
exception_response_length = self.transaction._calculate_exception_length() # pylint: disable=protected-access
400399

401400
if self.timeout:

0 commit comments

Comments
 (0)