Skip to content

Commit 830574d

Browse files
committed
CI.
1 parent f10ef45 commit 830574d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

examples/package_test_tool.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@
6060
from pymodbus.transport import NULLMODEM_HOST, CommParams, CommType, ModbusProtocol
6161

6262

63-
port = 5004
64-
6563
class TransportStub(ModbusProtocol):
6664
"""Protocol layer including transport."""
6765

@@ -101,14 +99,14 @@ def callback_new_connection(self) -> ModbusProtocol:
10199
return new_stub
102100

103101

104-
test_port = 5004
102+
test_port = 5004 # pylint: disable=invalid-name
105103

106104
class ClientTester: # pylint: disable=too-few-public-methods
107105
"""Main program."""
108106

109107
def __init__(self, comm: CommType):
110108
"""Initialize runtime tester."""
111-
global test_port
109+
global test_port # pylint: disable=global-statement
112110
self.comm = comm
113111
host = NULLMODEM_HOST
114112

@@ -147,7 +145,7 @@ class ServerTester: # pylint: disable=too-few-public-methods
147145

148146
def __init__(self, comm: CommType):
149147
"""Initialize runtime tester."""
150-
global test_port
148+
global test_port # pylint: disable=global-statement
151149
self.comm = comm
152150
self.store = ModbusSlaveContext(
153151
di=ModbusSequentialDataBlock(0, [17] * 100),
@@ -240,7 +238,7 @@ async def server_calls(transport: ModbusProtocol, is_tcp: bool):
240238

241239
def simulate_server(transport: ModbusProtocol, is_tcp: bool, request: bytes):
242240
"""Respond to request at transport level."""
243-
Log.debug("--> Server simulater called with request {}.", request, ":hex")
241+
Log.debug("--> Server simulator called with request {}.", request, ":hex")
244242
if is_tcp:
245243
response = b'\x00\x01\x00\x00\x00\x06\x00\x03\x00\x7c\x00\x04'
246244
else:
@@ -253,7 +251,7 @@ def simulate_server(transport: ModbusProtocol, is_tcp: bool, request: bytes):
253251
transport.send(response)
254252

255253

256-
def simulate_client(_transport: ModbusProtocol, is_tcp: bool, response: bytes):
254+
def simulate_client(_transport: ModbusProtocol, _is_tcp: bool, response: bytes):
257255
"""Respond to request at transport level."""
258256
Log.debug("--> Client simulator called with response {}.", response, ":hex")
259257

0 commit comments

Comments
 (0)