Skip to content

Commit

Permalink
docs: fix a few simple typos (#649)
Browse files Browse the repository at this point in the history
There are small typos in:
- README.rst
- examples/common/async_asyncio_client.py
- examples/common/async_asyncio_serial_client.py
- examples/common/asynchronous_processor.py
- examples/contrib/asynchronous_asyncio_modbus_tls_client.py
- examples/contrib/bcd_payload.py
- examples/contrib/concurrent_client.py
- examples/contrib/message_parser.py
- examples/contrib/modbus_saver.py
- examples/contrib/modbus_simulator.py
- examples/contrib/modbus_tls_client.py
- examples/contrib/modicon_payload.py
- examples/contrib/remote_server_context.py
- examples/gui/bottle/frontend.py
- examples/gui/bottle/media/js/backbone.js
- examples/tools/build_datastore.py
- pymodbus/client/sync.py
- pymodbus/constants.py
- pymodbus/datastore/context.py
- pymodbus/datastore/store.py
- pymodbus/device.py
- pymodbus/payload.py
- pymodbus/repl/client/mclient.py
- pymodbus/utilities.py
- test/test_server_sync.py

Fixes:
- Should read `necessary` rather than `neccessary`.
- Should read `separated` rather than `seperated`.
- Should read `response` rather than `reponse`.
- Should read `existence` rather than `existance`.
- Should read `continuously` rather than `continuosly`.
- Should read `asyncio` rather than `ayncio`.
- Should read `singleton` rather than `singleotn`.
- Should read `repository` rather than `respository`.
- Should read `recommended` rather than `recomended`.
- Should read `received` rather than `recieved`.
- Should read `processing` rather than `procesing`.
- Should read `preferred` rather than `prefered`.
- Should read `pickled` rather than `pickeld`.
- Should read `optional` rather than `optinoal`.
- Should read `message` rather than `messge`.
- Should read `initially` rather than `intially`.
- Should read `initialized` rather than `initialied`.
- Should read `initial` rather than `intial`.

Closes #642

Co-authored-by: dhoomakethu <[email protected]>
  • Loading branch information
timgates42 and dhoomakethu authored Aug 1, 2021
1 parent c8125c8 commit 9e731d8
Show file tree
Hide file tree
Showing 25 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ For those of you that just want to get started fast, here you go::
client.close()

For more advanced examples, check out the `Examples <https://pymodbus.readthedocs.io/en/dev/source/example/modules.html>`_ included in the
respository. If you have created any utilities that meet a specific
repository. If you have created any utilities that meet a specific
need, feel free to submit them so others can benefit.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -113,7 +113,7 @@ get lost in the noise: http://groups.google.com/group/pymodbus or
at gitter: https://gitter.im/pymodbus_dev/Lobby

.. important::
**Note For async clients, it is recomended to use `asyncio` as the async facilitator (Python 3.6 and above).**
**Note For async clients, it is recommended to use `asyncio` as the async facilitator (Python 3.6 and above).**
**If using tornado make sure the tornado version is `4.5.3`.Other versions of tornado can break the implementation**


Expand Down
2 changes: 1 addition & 1 deletion examples/common/async_asyncio_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
--------------------------------------------------------------------------
The following is an example of how to use the asynchronous modbus
client implementation from pymodbus with ayncio.
client implementation from pymodbus with asyncio.
The example is only valid on Python3.4 and above
"""
Expand Down
2 changes: 1 addition & 1 deletion examples/common/async_asyncio_serial_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
--------------------------------------------------------------------------
The following is an example of how to use the asynchronous serial modbus
client implementation from pymodbus with ayncio.
client implementation from pymodbus with asyncio.
The example is only valid on Python3.4 and above
"""
Expand Down
4 changes: 2 additions & 2 deletions examples/common/asynchronous_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
free to use it as a skeleton guide in implementing your own.
"""
# --------------------------------------------------------------------------- #
# import the neccessary modules
# import the necessary modules
# --------------------------------------------------------------------------- #
from twisted.internet import serialport, reactor
from twisted.internet.protocol import ClientFactory
Expand Down Expand Up @@ -46,7 +46,7 @@
# --------------------------------------------------------------------------- #
# an example custom protocol
# --------------------------------------------------------------------------- #
# Here you can perform your main procesing loop utilizing defereds and timed
# Here you can perform your main processing loop utilizing defereds and timed
# callbacks.
# --------------------------------------------------------------------------- #
class ExampleProtocol(ModbusClientProtocol):
Expand Down
2 changes: 1 addition & 1 deletion examples/contrib/asynchronous_asyncio_modbus_tls_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
the TLS feature and asyncio.
"""
# -------------------------------------------------------------------------- #
# import neccessary libraries
# import necessary libraries
# -------------------------------------------------------------------------- #
import ssl
from pymodbus.client.asynchronous.tls import AsyncModbusTLSClient
Expand Down
2 changes: 1 addition & 1 deletion examples/contrib/bcd_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def add_string(self, value):
class BcdPayloadDecoder(object):
"""
A utility that helps decode binary coded decimal payload
messages from a modbus reponse message. What follows is
messages from a modbus response message. What follows is
a simple example::
decoder = BcdPayloadDecoder(payload)
Expand Down
2 changes: 1 addition & 1 deletion examples/contrib/concurrent_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from futures import Future

# -------------------------------------------------------------------------- #
# import neccessary modbus libraries
# import necessary modbus libraries
# -------------------------------------------------------------------------- #
from pymodbus.client.common import ModbusClientMixin

Expand Down
2 changes: 1 addition & 1 deletion examples/contrib/message_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(self, framer, encode=False):
def decode(self, message):
""" Attempt to decode the supplied message
:param message: The messge to decode
:param message: The message to decode
"""
if IS_PYTHON3:
value = message if self.encode else c.encode(message, 'hex_codec')
Expand Down
2 changes: 1 addition & 1 deletion examples/contrib/modbus_saver.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
class ModbusDatastoreSaver(object):
""" An abstract base class that can be used to implement
a persistance format for the modbus server context. In
order to use it, just complete the neccessary callbacks
order to use it, just complete the necessary callbacks
(SAX style) that your persistance format needs.
"""

Expand Down
2 changes: 1 addition & 1 deletion examples/contrib/modbus_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def parse(self):
""" Parses the config file and creates a server context
"""
handle = pickle.load(self.file)
try: # test for existance, or bomb
try: # test for existence, or bomb
dsd = handle['di']
csd = handle['ci']
hsd = handle['hr']
Expand Down
2 changes: 1 addition & 1 deletion examples/contrib/modbus_tls_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
feature.
"""
# -------------------------------------------------------------------------- #
# import neccessary libraries
# import necessary libraries
# -------------------------------------------------------------------------- #
import ssl
from pymodbus.client.sync import ModbusTlsClient
Expand Down
2 changes: 1 addition & 1 deletion examples/contrib/modicon_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def add_string(self, value):
class ModiconPayloadDecoder(object):
"""
A utility that helps decode modicon encoded payload
messages from a modbus reponse message. What follows is
messages from a modbus response message. What follows is
a simple example::
decoder = ModiconPayloadDecoder(payload)
Expand Down
2 changes: 1 addition & 1 deletion examples/contrib/remote_server_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def __iter__(self):
def __contains__(self, slave):
""" Check if the given slave is in this list
:param slave: slave The slave to check for existance
:param slave: slave The slave to check for existence
:returns: True if the slave exists, False otherwise
"""
# we don't want to check the cache here as the
Expand Down
2 changes: 1 addition & 1 deletion examples/gui/bottle/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def build_application(server):
""" Helper method to create and initiailze a bottle application
:param server: The modbus server to pull instance data from
:returns: An initialied bottle application
:returns: An initialized bottle application
"""
log.info("building web application")
api = ModbusApiWebApp(server)
Expand Down
2 changes: 1 addition & 1 deletion examples/gui/bottle/media/js/backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@
tagName: 'div',

// jQuery delegate for element lookup, scoped to DOM elements within the
// current view. This should be prefered to global lookups where possible.
// current view. This should be preferred to global lookups where possible.
$: function(selector) {
return this.$el.find(selector);
},
Expand Down
2 changes: 1 addition & 1 deletion examples/tools/build_datastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __str__(self):
# Datablock Builders
#--------------------------------------------------------------------------#
def build_translation(option, opt, value, parser):
""" Converts a register dump list to a pickeld datastore
""" Converts a register dump list to a pickled datastore
:param option: The option instance
:param opt: The option string specified
Expand Down
4 changes: 2 additions & 2 deletions pymodbus/client/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def _recv(self, size):

# Timeout is reduced also if some data has been received in order
# to avoid infinite loops when there isn't an expected response
# size and the slave sends noisy data continuosly.
# size and the slave sends noisy data continuously.
if time_ > end:
break

Expand Down Expand Up @@ -447,7 +447,7 @@ def _recv(self, size):

# Timeout is reduced also if some data has been received in order
# to avoid infinite loops when there isn't an expected response
# size and the slave sends noisy data continuosly.
# size and the slave sends noisy data continuously.
if time_ > end:
break

Expand Down
2 changes: 1 addition & 1 deletion pymodbus/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class DeviceInformation(Singleton):
.. attribute:: Regular
In addition to basic data objects, the device provides additional
and optinoal identification and description data objects. All of
and optional identification and description data objects. All of
the objects of this category are defined in the standard but their
implementation is optional.
Expand Down
2 changes: 1 addition & 1 deletion pymodbus/datastore/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def __iter__(self):
def __contains__(self, slave):
''' Check if the given slave is in this list
:param slave: slave The slave to check for existance
:param slave: slave The slave to check for existence
:returns: True if the slave exists, False otherwise
'''
if self.single and self._slaves:
Expand Down
2 changes: 1 addition & 1 deletion pymodbus/datastore/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def create(klass, values=None):
return klass(values)

def reset(self):
''' Reset the store to the intially provided defaults'''
''' Reset the store to the initially provided defaults'''
self.values = self.default_value.copy()

def validate(self, address, count=1):
Expand Down
2 changes: 1 addition & 1 deletion pymodbus/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def summary(self):
#---------------------------------------------------------------------------#
class ModbusControlBlock(Singleton):
'''
This is a global singleotn that controls all system information
This is a global singleton that controls all system information
All activity should be logged here and all diagnostic requests
should come from here.
Expand Down
2 changes: 1 addition & 1 deletion pymodbus/payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def add_string(self, value):
class BinaryPayloadDecoder(object):
"""
A utility that helps decode payload messages from a modbus
reponse message. It really is just a simple wrapper around
response message. It really is just a simple wrapper around
the struct module, however it saves time looking up the format
strings. What follows is a simple example::
Expand Down
6 changes: 3 additions & 3 deletions pymodbus/repl/client/mclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def write_coils(self, address, values, **kwargs):
Write `value` to coil at `address`.
:param address: coil offset to write to
:param values: list of bit values to write (comma seperated)
:param values: list of bit values to write (comma separated)
:param unit: The slave unit this request is targeting
:return:
"""
Expand Down Expand Up @@ -183,7 +183,7 @@ def write_registers(self, address, values, **kwargs):
Write list of `values` to registers starting at `address`.
:param address: register offset to write to
:param values: list of register value to write (comma seperated)
:param values: list of register value to write (comma separated)
:param unit: The slave unit this request is targeting
:return:
"""
Expand Down Expand Up @@ -239,7 +239,7 @@ def readwrite_registers(self, read_address, read_count, write_address,
:param read_address: register offset to read from
:param read_count: Number of registers to read
:param write_address: register offset to write to
:param write_registers: List of register values to write (comma seperated)
:param write_registers: List of register values to write (comma separated)
:param unit: The slave unit this request is targeting
:return:
"""
Expand Down
2 changes: 1 addition & 1 deletion pymodbus/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def rtuFrameSize(data, byte_count_pos):

def hexlify_packets(packet):
"""
Returns hex representation of bytestring recieved
Returns hex representation of bytestring received
:param packet:
:return:
"""
Expand Down
2 changes: 1 addition & 1 deletion test/test_server_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def testTcpServerProcess(self):
# Test TLS Server
#-----------------------------------------------------------------------#
def testTlsServerInit(self):
''' test that the synchronous TLS server intial correctly '''
''' test that the synchronous TLS server initial correctly '''
with patch.object(socketserver.TCPServer, 'server_activate'):
with patch.object(ssl.SSLContext, 'load_cert_chain') as mock_method:
identity = ModbusDeviceIdentification(info={0x00: 'VendorName'})
Expand Down

0 comments on commit 9e731d8

Please sign in to comment.