Skip to content

Commit 0017130

Browse files
authored
Codespell for examples. (#849)
1 parent bee714b commit 0017130

20 files changed

+31
-31
lines changed

examples/common/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pymodbus
1212
You can use pymodbus as a testing server by simply modifying
1313
one of the run scripts supplied here. There is an
1414
asynchronous version and a synchronous version (that really
15-
differ in how mnay dependencies you are willing to have).
15+
differ in how many dependencies you are willing to have).
1616
Regardless of which one you choose, they can be started
1717
quite easily::
1818

examples/common/async_asyncio_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ async def start_async_test(client):
116116
'write_address': 1,
117117
'write_registers': [20] * 8,
118118
}
119-
_logger.debug("Read write registeres simulataneously")
119+
_logger.debug("Read write registers simultaneously")
120120
rq = await client.readwrite_registers(unit=UNIT, **arguments)
121121
rr = await client.read_holding_registers(1, 8, unit=UNIT)
122122
assert rq.function_code < 0x80 # test that we are not an error

examples/common/async_asyncio_serial_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ async def start_async_test(client): # pylint: disable=redefined-outer-name
109109
'write_address': 1,
110110
'write_registers': [20] * 8,
111111
}
112-
log.debug("Read write registers simulataneously")
112+
log.debug("Read write registers simultaneously")
113113
rq = await client.readwrite_registers(unit=UNIT, **arguments)
114114
rr = await client.read_holding_registers(1, 8, unit=UNIT)
115115
assert rq.function_code < 0x80 # test that we are not an error

examples/common/async_tornado_client_serial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def begin_asynchronous_test(client, protocol): #NOSONAR pylint: disable=redefine
132132
# ---------------------------------------------------------------------------#
133133

134134
def err(*args, **kwargs):
135-
"""" Errror. """
135+
"""" handle error. """
136136
txt = f"Err {args} {kwargs}"
137137
log.error(txt)
138138

examples/common/asynchronous_processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def error_handler(self, failure): # pylint: disable=no-self-use
108108
#
109109
# Factory(Protocol) -> ProtocolInstance
110110
#
111-
# It also persists data between client instances (think protocol singelton).
111+
# It also persists data between client instances (think protocol singleton).
112112
# --------------------------------------------------------------------------- #
113113
class ExampleFactory(ClientFactory):
114114
""" Example factory. """

examples/common/asynchronous_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def run_async_server():
5858
# store = ModbusSlaveContext()
5959
#
6060
# Finally, you are allowed to use the same DataBlock reference for every
61-
# table or you you may use a seperate DataBlock for each table.
61+
# table or you you may use a separate DataBlock for each table.
6262
# This depends if you would like functions to be able to access and modify
6363
# the same data or not::
6464
#

examples/common/changing_framers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
(like a binary framer over a serial connection).
99
1010
It should be noted that although you are not limited to trying whatever
11-
you would like, the library makes no gurantees that all framers with
11+
you would like, the library makes no guarantees that all framers with
1212
all transports will produce predictable or correct results (for example
1313
tcp transport with an RTU framer). However, please let us know of any
1414
success cases that are not documented!

examples/common/modbus_payload.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ def run_binary_payload_ex():
9494
print()
9595
builder = BinaryPayloadBuilder(byteorder=byte_endian,
9696
wordorder=word_endian)
97-
strng = "abcdefgh"
98-
builder.add_string(strng)
97+
my_string = "abcdefgh"
98+
builder.add_string(my_string)
9999
builder.add_bits([0, 1, 0, 1, 1, 0, 1, 0])
100100
builder.add_8bit_int(-0x12)
101101
builder.add_8bit_uint(0x12)
@@ -170,7 +170,7 @@ def run_binary_payload_ex():
170170
"Make sure wordorder is consistent between BinaryPayloadBuilder and BinaryPayloadDecoder" # pylint: disable=protected-access
171171

172172
decoded = OrderedDict([
173-
('string', decoder.decode_string(len(strng))),
173+
('string', decoder.decode_string(len(my_string))),
174174
('bits', decoder.decode_bits()),
175175
('8int', decoder.decode_8bit_int()),
176176
('8uint', decoder.decode_8bit_uint()),

examples/common/synchronous_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def run_sync_client():
153153
'write_address': 1, # noqa E221
154154
'write_registers': [20] * 8,
155155
}
156-
log.debug("Read write registeres simulataneously")
156+
log.debug("Read write registers simultaneously")
157157
rq = client.readwrite_registers(unit=UNIT, **arguments)
158158
rr = client.read_holding_registers(1, 8, unit=UNIT)
159159
assert not rq.isError() # test that we are not an error

examples/contrib/bcd_payload.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ def __init__(self, payload=None, endian=Endian.Little):
7272
""" Initialize a new instance of the payload builder
7373
7474
:param payload: Raw payload data to initialize with
75-
:param endian: The endianess of the payload
75+
:param endian: The endianness of the payload
7676
"""
77-
self._payload = payload or []
7877
self._endian = endian
78+
self._payload = payload or []
7979

8080
def __str__(self):
8181
""" Return the payload buffer as a string
@@ -165,7 +165,7 @@ def fromRegisters(registers, endian=Endian.Little): # pylint: disable=invalid-na
165165
been decoded by the rest of the library.
166166
167167
:param registers: The register results to initialize with
168-
:param endian: The endianess of the payload
168+
:param endian: The endianness of the payload
169169
:returns: An initialized PayloadDecoder
170170
"""
171171
if isinstance(registers, list): # repack into flat binary
@@ -181,7 +181,7 @@ def fromCoils(coils, endian=Endian.Little): # pylint: disable=invalid-name
181181
The coils are treated as a list of bit(boolean) values.
182182
183183
:param coils: The coil results to initialize with
184-
:param endian: The endianess of the payload
184+
:param endian: The endianness of the payload
185185
:returns: An initialized PayloadDecoder
186186
"""
187187
if isinstance(coils, list):

0 commit comments

Comments
 (0)