diff --git a/examples/client_payload.py b/examples/client_payload.py index 2fc283d3d..f29ef2d84 100755 --- a/examples/client_payload.py +++ b/examples/client_payload.py @@ -27,8 +27,8 @@ async def run_payload_calls(client): If you need to build a complex message to send, you can use the payload builder to simplify the packing logic - Packing/unpacking depends on your CPU´s word/byte order. Modbus messages - are always using big endian. BinaryPayloadBuilder will pr default use + Packing/unpacking depends on your CPU's word/byte order. Modbus messages + are always using big endian. BinaryPayloadBuilder will per default use what your CPU uses. The wordorder is applicable only for 32 and 64 bit values Lets say we need to write a value 0x12345678 to a 32 bit register diff --git a/examples/server_async.py b/examples/server_async.py index c1a6a97c7..2bea9082e 100755 --- a/examples/server_async.py +++ b/examples/server_async.py @@ -121,7 +121,7 @@ def setup_server(args): # ----------------------------------------------------------------------- # # initialize the server information # ----------------------------------------------------------------------- # - # If you don"t set this or any fields, they are defaulted to empty strings. + # If you don't set this or any fields, they are defaulted to empty strings. # ----------------------------------------------------------------------- # args.identity = ModbusDeviceIdentification( info_name={ diff --git a/examples/v2.5.3/asynchronous_asyncio_modbus_tls_client.py b/examples/v2.5.3/asynchronous_asyncio_modbus_tls_client.py index 5df2e1247..1d9ecd3e9 100755 --- a/examples/v2.5.3/asynchronous_asyncio_modbus_tls_client.py +++ b/examples/v2.5.3/asynchronous_asyncio_modbus_tls_client.py @@ -22,7 +22,7 @@ sslctx.verify_mode = ssl.CERT_REQUIRED sslctx.check_hostname = True -# Prepare client"s certificate which the server requires for TLS full handshake +# Prepare client's certificate which the server requires for TLS full handshake # sslctx.load_cert_chain(certfile="client.crt", keyfile="client.key", # password="pwd") diff --git a/examples/v2.5.3/concurrent_client.py b/examples/v2.5.3/concurrent_client.py index 3cacf3c36..24d26662d 100755 --- a/examples/v2.5.3/concurrent_client.py +++ b/examples/v2.5.3/concurrent_client.py @@ -218,7 +218,7 @@ def execute(self, request): of the call. :param request: The request to execute - :returns: A future linked to the call"s response + :returns: A future linked to the call's response """ fut, work_id = Future(), next(self.counter) self.input_queue.put(WorkRequest(request, work_id)) diff --git a/examples/v2.5.3/custom_synchronous_server.py b/examples/v2.5.3/custom_synchronous_server.py index b2d1366de..9c405095f 100755 --- a/examples/v2.5.3/custom_synchronous_server.py +++ b/examples/v2.5.3/custom_synchronous_server.py @@ -103,7 +103,7 @@ def run_server(): # ----------------------------------------------------------------------- # # initialize the server information # ----------------------------------------------------------------------- # - # If you don"t set this or any fields, they are defaulted to empty strings. + # If you don't set this or any fields, they are defaulted to empty strings. # ----------------------------------------------------------------------- # identity = ModbusDeviceIdentification( info_name={ diff --git a/examples/v2.5.3/deviceinfo_showcase_server.py b/examples/v2.5.3/deviceinfo_showcase_server.py index 0821b9a1b..2550d0451 100755 --- a/examples/v2.5.3/deviceinfo_showcase_server.py +++ b/examples/v2.5.3/deviceinfo_showcase_server.py @@ -48,7 +48,7 @@ def run_server(): # ----------------------------------------------------------------------- # # initialize the server information # ----------------------------------------------------------------------- # - # If you don"t set this or any fields, they are defaulted to empty strings. + # If you don't set this or any fields, they are defaulted to empty strings. # ----------------------------------------------------------------------- # identity = ModbusDeviceIdentification( info_name={ diff --git a/examples/v2.5.3/libmodbus_client.py b/examples/v2.5.3/libmodbus_client.py index db8c78ceb..b6af5564d 100755 --- a/examples/v2.5.3/libmodbus_client.py +++ b/examples/v2.5.3/libmodbus_client.py @@ -142,7 +142,7 @@ class NotImplementedException(Exception): class LibmodbusLevel1Client: """A raw wrapper around the libmodbus c library. - Feel free to use it if you want increased performance and don"t mind the + Feel free to use it if you want increased performance and don't mind the entire protocol not being implemented. """ diff --git a/examples/v2.5.3/modbus_simulator.py b/examples/v2.5.3/modbus_simulator.py index f7310badb..f52d9c5a3 100644 --- a/examples/v2.5.3/modbus_simulator.py +++ b/examples/v2.5.3/modbus_simulator.py @@ -22,14 +22,14 @@ # -------------------------------------------------------------------------- # # Extra Global Functions # -------------------------------------------------------------------------- # -# These are extra helper functions that don"t belong in a class +# These are extra helper functions that don't belong in a class # -------------------------------------------------------------------------- # # import getpass def root_test(): """Check to see if we are running as root""" - return True # removed for the time being as it isn"t portable + return True # removed for the time being as it isn't portable # return getpass.getuser() == "root" diff --git a/examples/v2.5.3/modbus_tls_client.py b/examples/v2.5.3/modbus_tls_client.py index 21705f238..042cf61b9 100755 --- a/examples/v2.5.3/modbus_tls_client.py +++ b/examples/v2.5.3/modbus_tls_client.py @@ -20,7 +20,7 @@ sslctx.verify_mode = ssl.CERT_REQUIRED sslctx.check_hostname = True -# Prepare client"s certificate which the server requires for TLS full handshake +# Prepare client's certificate which the server requires for TLS full handshake # sslctx.load_cert_chain(certfile="client.crt", keyfile="client.key", # password="pwd") diff --git a/examples/v2.5.3/remote_server_context.py b/examples/v2.5.3/remote_server_context.py index e536d132c..9ac452a8d 100644 --- a/examples/v2.5.3/remote_server_context.py +++ b/examples/v2.5.3/remote_server_context.py @@ -198,7 +198,7 @@ def __contains__(self, slave): :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 + # we don't want to check the cache here as the # slave may not exist yet or may not exist any # more. The best thing to do is try and fail. return True @@ -209,14 +209,14 @@ def __setitem__(self, slave, context): :param slave: The slave context to set :param context: The new context to set for this slave """ - raise NotImplementedException() # doesn"t make sense here + raise NotImplementedException() # doesn't make sense here def __delitem__(self, slave): """Use to access the slave context :param slave: The slave context to remove """ - raise NotImplementedException() # doesn"t make sense here + raise NotImplementedException() # doesn't make sense here def __getitem__(self, slave): """Use to get access to a slave context diff --git a/examples/v2.5.3/tornado_twisted/asynchronous_processor.py b/examples/v2.5.3/tornado_twisted/asynchronous_processor.py index 142bd3e62..2e2fd3bfa 100755 --- a/examples/v2.5.3/tornado_twisted/asynchronous_processor.py +++ b/examples/v2.5.3/tornado_twisted/asynchronous_processor.py @@ -104,7 +104,7 @@ def error_handler(self, failure): # --------------------------------------------------------------------------- # # a factory for the example protocol # --------------------------------------------------------------------------- # -# This is used to build client protocol"s if you tie into twisted"s method +# This is used to build client protocol's if you tie into twisted's method # of processing. It basically produces client instances of the underlying # protocol:: # diff --git a/examples/v2.5.3/tornado_twisted/asynchronous_server.py b/examples/v2.5.3/tornado_twisted/asynchronous_server.py index ac44ed4aa..12ec37140 100755 --- a/examples/v2.5.3/tornado_twisted/asynchronous_server.py +++ b/examples/v2.5.3/tornado_twisted/asynchronous_server.py @@ -115,7 +115,7 @@ def run_async_server(): # ----------------------------------------------------------------------- # # initialize the server information # ----------------------------------------------------------------------- # - # If you don"t set this or any fields, they are defaulted to empty strings. + # If you don't set this or any fields, they are defaulted to empty strings. # ----------------------------------------------------------------------- # identity = ModbusDeviceIdentification( info_name={ diff --git a/examples/v2.5.3/tornado_twisted/modbus_scraper.py b/examples/v2.5.3/tornado_twisted/modbus_scraper.py index a226a4dc1..0fea743c2 100755 --- a/examples/v2.5.3/tornado_twisted/modbus_scraper.py +++ b/examples/v2.5.3/tornado_twisted/modbus_scraper.py @@ -138,7 +138,7 @@ def error_handler(self, failure): # --------------------------------------------------------------------------- # # a factory for the example protocol # --------------------------------------------------------------------------- # -# This is used to build client protocol"s if you tie into twisted"s method +# This is used to build client protocol's if you tie into twisted's method # of processing. It basically produces client instances of the underlying # protocol:: # diff --git a/pymodbus/bit_read_message.py b/pymodbus/bit_read_message.py index 6fcdb436e..11cb759c4 100644 --- a/pymodbus/bit_read_message.py +++ b/pymodbus/bit_read_message.py @@ -111,7 +111,7 @@ def resetBit(self, address): # pylint: disable=invalid-name self.setBit(address, 0) def getBit(self, address): # pylint: disable=invalid-name - """Get the specified bit"s value. + """Get the specified bit's value. :param address: The bit to query :returns: The value of the requested bit diff --git a/pymodbus/client/base.py b/pymodbus/client/base.py index 9a0633dc9..ec1f7cf2a 100644 --- a/pymodbus/client/base.py +++ b/pymodbus/client/base.py @@ -26,7 +26,7 @@ class ModbusBaseClient(ModbusClientMixin): :param framer: (optional) Modbus Framer class. :param timeout: (optional) Timeout for a request, in seconds. - :param retries: (optional) Max number of retries pr request. + :param retries: (optional) Max number of retries per request. :param retry_on_empty: (optional) Retry on empty response. :param close_comm_on_error: (optional) Close connection on error. :param strict: (optional) Strict timing, 1.5 character between requests. diff --git a/pymodbus/client/serial.py b/pymodbus/client/serial.py index a605bc5ba..8dc73294d 100644 --- a/pymodbus/client/serial.py +++ b/pymodbus/client/serial.py @@ -27,14 +27,14 @@ class AsyncModbusSerialClient(ModbusBaseClient): :param port: Serial port used for communication. :param framer: (optional) Framer class. - :param baudrate: (optional) Bits pr second. - :param bytesize: (optional) Number of bits pr byte 7-8. + :param baudrate: (optional) Bits per second. + :param bytesize: (optional) Number of bits per byte 7-8. :param parity: (optional) 'E'ven, 'O'dd or 'N'one :param stopbits: (optional) Number of stop bits 0-2¡. :param handle_local_echo: (optional) Discard local echo from dongle. :param kwargs: (optional) Experimental parameters - The serial communication is RS-485 based, and usually used vith a usb RS485 dongle. + The serial communication is RS-485 based, and usually used with a usb RS485 dongle. Example:: @@ -153,14 +153,14 @@ class ModbusSerialClient(ModbusBaseClient): :param port: Serial port used for communication. :param framer: (optional) Framer class. - :param baudrate: (optional) Bits pr second. - :param bytesize: (optional) Number of bits pr byte 7-8. + :param baudrate: (optional) Bits per second. + :param bytesize: (optional) Number of bits per byte 7-8. :param parity: (optional) 'E'ven, 'O'dd or 'N'one :param stopbits: (optional) Number of stop bits 0-2¡. :param handle_local_echo: (optional) Discard local echo from dongle. :param kwargs: (optional) Experimental parameters - The serial communication is RS-485 based, and usually used vith a usb RS485 dongle. + The serial communication is RS-485 based, and usually used with a usb RS485 dongle. Example:: diff --git a/pymodbus/client/sync_diag.py b/pymodbus/client/sync_diag.py index 791a97afd..d3822795a 100644 --- a/pymodbus/client/sync_diag.py +++ b/pymodbus/client/sync_diag.py @@ -128,7 +128,7 @@ def recv(self, size): return result except ConnectionException as exc: - # Only log actual network errors, "if not self.socket" then it"s a internal code issue + # Only log actual network errors, "if not self.socket" then it's a internal code issue if "Connection unexpectedly closed" in exc.string: _logger.error(LOG_MSGS["unexpected_dc_msg"], self, exc) raise ConnectionException from exc diff --git a/pymodbus/client/tcp.py b/pymodbus/client/tcp.py index ad36982e5..d8130f5e0 100644 --- a/pymodbus/client/tcp.py +++ b/pymodbus/client/tcp.py @@ -21,9 +21,9 @@ class AsyncModbusTcpClient(ModbusBaseClient): """**AsyncModbusTcpClient**. :param host: Host IP address or host name - :param port: (optional) Port used for communication. - :param framer: (optional) Framer class. - :param source_address: (optional) source address of client, + :param port: (optional) Port used for communication + :param framer: (optional) Framer class + :param source_address: (optional) source address of client :param kwargs: (optional) Experimental parameters Example:: @@ -153,9 +153,9 @@ class ModbusTcpClient(ModbusBaseClient): """**ModbusTcpClient**. :param host: Host IP address or host name - :param port: (optional) Port used for communication. - :param framer: (optional) Framer class. - :param source_address: (optional) source address of client, + :param port: (optional) Port used for communication + :param framer: (optional) Framer class + :param source_address: (optional) source address of client :param kwargs: (optional) Experimental parameters Example:: @@ -257,7 +257,7 @@ def recv(self, size): timeout = self.params.timeout - # If size isn"t specified read up to 4096 bytes at a time. + # If size isn't specified read up to 4096 bytes at a time. if size is None: recv_size = 4096 else: @@ -281,12 +281,12 @@ def recv(self, size): data_length += len(recv_data) time_ = time.time() - # If size isn"t specified continue to read until timeout expires. + # If size isn't specified continue to read until timeout expires. if size: recv_size = size - data_length # Timeout is reduced also if some data has been received in order - # to avoid infinite loops when there isn"t an expected response + # to avoid infinite loops when there isn't an expected response # size and the slave sends noisy data continuously. if time_ > end: break diff --git a/pymodbus/client/tls.py b/pymodbus/client/tls.py index 5cca035f3..3af458eca 100644 --- a/pymodbus/client/tls.py +++ b/pymodbus/client/tls.py @@ -23,9 +23,9 @@ def sslctx_provider( :param sslctx: The user defined SSLContext to use for TLS (default None and auto create) - :param certfile: The optional client"s cert file path for TLS server request - :param keyfile: The optional client"s key file path for TLS server request - :param password: The password for for decrypting client"s private key file + :param certfile: The optional client's cert file path for TLS server request + :param keyfile: The optional client's key file path for TLS server request + :param password: The password for decrypting client's private key file """ if sslctx: return sslctx @@ -46,15 +46,15 @@ class AsyncModbusTlsClient(AsyncModbusTcpClient): """**AsyncModbusTlsClient**. :param host: Host IP address or host name - :param port: (optional) Port used for communication. - :param framer: (optional) Framer class. - :param source_address: (optional) Source address of client, + :param port: (optional) Port used for communication + :param framer: (optional) Framer class + :param source_address: (optional) Source address of client :param sslctx: (optional) SSLContext to use for TLS :param certfile: (optional) Cert file path for TLS server request :param keyfile: (optional) Key file path for TLS server request :param password: (optional) Password for for decrypting private key file - :param server_hostname: (optional) Bind certificate to host, - :param kwargs: (optional) Experimental parameters. + :param server_hostname: (optional) Bind certificate to host + :param kwargs: (optional) Experimental parameters Example:: @@ -116,15 +116,15 @@ class ModbusTlsClient(ModbusTcpClient): """**ModbusTlsClient**. :param host: Host IP address or host name - :param port: (optional) Port used for communication. - :param framer: (optional) Framer class. - :param source_address: (optional) Source address of client, + :param port: (optional) Port used for communication + :param framer: (optional) Framer class + :param source_address: (optional) Source address of client :param sslctx: (optional) SSLContext to use for TLS :param certfile: (optional) Cert file path for TLS server request :param keyfile: (optional) Key file path for TLS server request - :param password: (optional) Password for for decrypting private key file - :param server_hostname: (optional) Bind certificate to host, - :param kwargs: (optional) Experimental parameters. + :param password: (optional) Password for decrypting private key file + :param server_hostname: (optional) Bind certificate to host + :param kwargs: (optional) Experimental parameters Example:: diff --git a/pymodbus/constants.py b/pymodbus/constants.py index ccd85b130..a2e425f6f 100644 --- a/pymodbus/constants.py +++ b/pymodbus/constants.py @@ -56,12 +56,12 @@ class Defaults(Singleton): # pylint: disable=too-few-public-methods .. attribute:: ProtocolId - The modbus protocol id. Currently this is set to 0 in all + The modbus protocol id. Currently, this is set to 0 in all but proprietary implementations. .. attribute:: Slave - The modbus slave address. Currently this is set to 0x00 which + The modbus slave address. Currently, this is set to 0x00 which means this request should be broadcast to all the slave devices (really means that all the devices should respond). @@ -188,11 +188,11 @@ class Endian(Singleton): # pylint: disable=too-few-public-methods .. attribute:: Big - This indicates that the bytes are in little endian format + This indicates that the bytes are in big endian format .. attribute:: Little - This indicates that the bytes are in big endian format + This indicates that the bytes are in little endian format .. note:: I am simply borrowing the format strings from the python struct module for my convenience. diff --git a/pymodbus/diag_message.py b/pymodbus/diag_message.py index 7f05d70b4..77f6a9dbd 100644 --- a/pymodbus/diag_message.py +++ b/pymodbus/diag_message.py @@ -296,7 +296,7 @@ def __init__(self, toggle=False, **kwargs): # Diagnostic Sub Code 02 # ---------------------------------------------------------------------------# class ReturnDiagnosticRegisterRequest(DiagnosticStatusSimpleRequest): - """The contents of the remote device"s 16-bit diagnostic register are returned in the response.""" + """The contents of the remote device's 16-bit diagnostic register are returned in the response.""" sub_function_code = 0x0002 @@ -313,7 +313,7 @@ def execute(self, *args): class ReturnDiagnosticRegisterResponse(DiagnosticStatusSimpleResponse): """Return diagnostic register. - The contents of the remote device"s 16-bit diagnostic register are + The contents of the remote device's 16-bit diagnostic register are returned in the response """ diff --git a/pymodbus/factory.py b/pymodbus/factory.py index 9ea58c24b..df6eeb419 100644 --- a/pymodbus/factory.py +++ b/pymodbus/factory.py @@ -2,7 +2,7 @@ The following factories make it easy to decode request/response messages. To add a new request/response pair to be decodeable by the library, simply -add them to the respective function lookup table (order doesn"t matter, but +add them to the respective function lookup table (order doesn't matter, but it does help keep things organized). Regardless of how many functions are added to the lookup, O(1) behavior is diff --git a/pymodbus/framer/ascii_framer.py b/pymodbus/framer/ascii_framer.py index c01576195..c28c43e1c 100644 --- a/pymodbus/framer/ascii_framer.py +++ b/pymodbus/framer/ascii_framer.py @@ -129,7 +129,7 @@ def resetFrame(self): # pylint: disable=invalid-name This allows us to skip ovver errors that may be in the stream. It is hard to know if we are simply out of sync or if there is an error in the stream as we have no way to check the start or - end of the message (python just doesn"t have the resolution to + end of the message (python just doesn't have the resolution to check for millisecond delays). """ self._buffer = b"" diff --git a/pymodbus/framer/binary_framer.py b/pymodbus/framer/binary_framer.py index d51e21d3f..16730dc3c 100644 --- a/pymodbus/framer/binary_framer.py +++ b/pymodbus/framer/binary_framer.py @@ -227,7 +227,7 @@ def resetFrame(self): # pylint: disable=invalid-name This allows us to skip ovver errors that may be in the stream. It is hard to know if we are simply out of sync or if there is an error in the stream as we have no way to check the start or - end of the message (python just doesn"t have the resolution to + end of the message (python just doesn't have the resolution to check for millisecond delays). """ self._buffer = b"" diff --git a/pymodbus/framer/rtu_framer.py b/pymodbus/framer/rtu_framer.py index a7a65596b..27c4d97c2 100644 --- a/pymodbus/framer/rtu_framer.py +++ b/pymodbus/framer/rtu_framer.py @@ -122,7 +122,7 @@ def resetFrame(self): # pylint: disable=invalid-name This allows us to skip over errors that may be in the stream. It is hard to know if we are simply out of sync or if there is an error in the stream as we have no way to check the start or - end of the message (python just doesn"t have the resolution to + end of the message (python just doesn't have the resolution to check for millisecond delays). """ txt = ( diff --git a/pymodbus/framer/socket_framer.py b/pymodbus/framer/socket_framer.py index 1458aaa23..588bb77c6 100644 --- a/pymodbus/framer/socket_framer.py +++ b/pymodbus/framer/socket_framer.py @@ -75,7 +75,7 @@ def checkFrame(self): # we have at least a complete message, continue elif len(self._buffer) - self._hsize + 1 >= self._header["len"]: return True - # we don"t have enough of a message yet, wait + # we don't have enough of a message yet, wait return False def advanceFrame(self): @@ -207,7 +207,7 @@ def resetFrame(self): # pylint: disable=invalid-name This allows us to skip ovver errors that may be in the stream. It is hard to know if we are simply out of sync or if there is an error in the stream as we have no way to check the start or - end of the message (python just doesn"t have the resolution to + end of the message (python just doesn't have the resolution to check for millisecond delays). """ self._buffer = b"" diff --git a/pymodbus/framer/tls_framer.py b/pymodbus/framer/tls_framer.py index 467bca7df..490f7630f 100644 --- a/pymodbus/framer/tls_framer.py +++ b/pymodbus/framer/tls_framer.py @@ -57,7 +57,7 @@ def checkFrame(self): # we have at least a complete message, continue if len(self._buffer) - self._hsize >= 1: return True - # we don"t have enough of a message yet, wait + # we don't have enough of a message yet, wait return False def advanceFrame(self): @@ -171,7 +171,7 @@ def resetFrame(self): # pylint: disable=invalid-name This allows us to skip ovver errors that may be in the stream. It is hard to know if we are simply out of sync or if there is an error in the stream as we have no way to check the start or - end of the message (python just doesn"t have the resolution to + end of the message (python just doesn't have the resolution to check for millisecond delays). """ self._buffer = b"" diff --git a/pymodbus/other_message.py b/pymodbus/other_message.py index 0e8e5cf70..2ac9f6bee 100644 --- a/pymodbus/other_message.py +++ b/pymodbus/other_message.py @@ -113,13 +113,13 @@ def __str__(self): class GetCommEventCounterRequest(ModbusRequest): """This function code is used to get a status word. - And an event count from the remote device"s communication event counter. + And an event count from the remote device's communication event counter. By fetching the current count before and after a series of messages, a client can determine whether the messages were handled normally by the remote device. - The device"s event counter is incremented once for each successful + The device's event counter is incremented once for each successful message completion. It is not incremented for exception responses, poll commands, or fetch event counter commands. diff --git a/pymodbus/payload.py b/pymodbus/payload.py index c14ab2f49..b0a394074 100644 --- a/pymodbus/payload.py +++ b/pymodbus/payload.py @@ -333,7 +333,7 @@ def fromCoils( # pylint: disable=invalid-name """ if isinstance(coils, list): payload = b"" - if padding := len(coils) % 8: # Pad zero"s + if padding := len(coils) % 8: # Pad zeros extra = [False] * padding coils = extra + coils chunks = cls.bit_chunks(coils) diff --git a/pymodbus/pdu.py b/pymodbus/pdu.py index b761f58a5..5c4588326 100644 --- a/pymodbus/pdu.py +++ b/pymodbus/pdu.py @@ -16,7 +16,7 @@ # --------------------------------------------------------------------------- # -# Base PDU"s +# Base PDUs # --------------------------------------------------------------------------- # class ModbusPDU: """Base class for all Modbus messages. @@ -149,7 +149,7 @@ def isError(self): # pylint: disable=invalid-name # --------------------------------------------------------------------------- # -# Exception PDU"s +# Exception PDUs # --------------------------------------------------------------------------- # class ModbusExceptions(Singleton): # pylint: disable=too-few-public-methods """An enumeration of the valid modbus exceptions.""" diff --git a/pymodbus/register_write_message.py b/pymodbus/register_write_message.py index 1b64f3f2c..a565f3351 100644 --- a/pymodbus/register_write_message.py +++ b/pymodbus/register_write_message.py @@ -271,7 +271,7 @@ class MaskWriteRegisterRequest(ModbusRequest): """This function code is used to modify the contents. Of a specified holding register using a combination of an AND mask, - an OR mask, and the register"s current contents. + an OR mask, and the register's current contents. The function can be used to set or clear individual bits in the register. """ diff --git a/pymodbus/repl/client/mclient.py b/pymodbus/repl/client/mclient.py index c76ce98b9..2bc40fd0f 100644 --- a/pymodbus/repl/client/mclient.py +++ b/pymodbus/repl/client/mclient.py @@ -338,7 +338,7 @@ def read_exception_status(self, **kwargs): def get_com_event_counter(self, **kwargs): """Read status word and an event count. - From the remote device"s communication event counter. + From the remote device's communication event counter. :param kwargs: :return: diff --git a/pymodbus/server/async_io.py b/pymodbus/server/async_io.py index 1e28d0683..a06f4074f 100644 --- a/pymodbus/server/async_io.py +++ b/pymodbus/server/async_io.py @@ -49,7 +49,7 @@ def sslctx_provider( :param certfile: The cert file path for TLS (used if sslctx is None) :param keyfile: The key file path for TLS (used if sslctx is None) :param password: The password for for decrypting the private key file - :param reqclicert: Force the sever request client"s certificate + :param reqclicert: Force the sever request client's certificate """ if sslctx is None: # According to MODBUS/TCP Security Protocol Specification, it is @@ -179,7 +179,7 @@ async def handle(self): # pylint: disable=too-complex Once the client connection is established, the data chunks will be fed to this coroutine via the asyncio.Queue object which is fed by - the ModbusBaseRequestHandler class"s callback Future. + the ModbusBaseRequestHandler class's callback Future. This callback future gets data from either asyncio.DatagramProtocol.datagram_received or @@ -640,7 +640,7 @@ def __init__( # pylint: disable=too-many-arguments :param certfile: The cert file path for TLS (used if sslctx is None) :param keyfile: The key file path for TLS (used if sslctx is None) :param password: The password for for decrypting the private key file - :param reqclicert: Force the sever request client"s certificate + :param reqclicert: Force the sever request client's certificate :param handler: A handler for each client session; default is ModbusConnectedRequestHandler. The handler class receives connection create/teardown events @@ -1067,7 +1067,7 @@ async def StartAsyncTlsServer( # pylint: disable=invalid-name,dangerous-default :param certfile: The cert file path for TLS (used if sslctx is None) :param keyfile: The key file path for TLS (used if sslctx is None) :param password: The password for for decrypting the private key file - :param reqclicert: Force the sever request client"s certificate + :param reqclicert: Force the sever request client's certificate :param allow_reuse_address: Whether the server will allow the reuse of an address. :param allow_reuse_port: Whether the server will allow the reuse of a port. diff --git a/pymodbus/utilities.py b/pymodbus/utilities.py index 6ede25d22..bcb429a7c 100644 --- a/pymodbus/utilities.py +++ b/pymodbus/utilities.py @@ -184,7 +184,7 @@ def computeCRC(data): # pylint: disable=invalid-name For modbus, this is only used on the binary serial protocols (in this case RTU). - The difference between modbus"s crc16 and a normal crc16 + The difference between modbus's crc16 and a normal crc16 is that modbus starts the crc value out at 0xffff. :param data: The data to create a crc16 of diff --git a/test/test_factory.py b/test/test_factory.py index ddd9d2ee6..aa5e70731 100644 --- a/test/test_factory.py +++ b/test/test_factory.py @@ -211,7 +211,7 @@ class NoCustomResponse: # pylint: disable=too-few-public-methods self.assertTrue(func_raised) # ---------------------------------------------------------------------------# - # I don"t actually know what is supposed to be returned here, I assume that + # I don't actually know what is supposed to be returned here, I assume that # since the high bit is set, it will simply echo the resulting message # ---------------------------------------------------------------------------# diff --git a/test/test_interfaces.py b/test/test_interfaces.py index 3f9d7ac47..ccff9bcb1 100644 --- a/test/test_interfaces.py +++ b/test/test_interfaces.py @@ -31,7 +31,7 @@ def test_singleton_interface(self): self.assertEqual(first, second) def test_imodbusdecoder(self): - """Test that the base class isn"t implemented""" + """Test that the base class isn't implemented""" x_base = None instance = IModbusDecoder() self.assertRaises(NotImplementedException, lambda: instance.decode(x_base)) @@ -41,7 +41,7 @@ def test_imodbusdecoder(self): self.assertRaises(NotImplementedException, lambda: instance.register(x_base)) def test_modbus_framer_interface(self): - """Test that the base class isn"t implemented""" + """Test that the base class isn't implemented""" x_base = None instance = IModbusFramer() self.assertRaises(NotImplementedException, instance.checkFrame) @@ -59,7 +59,7 @@ def test_modbus_framer_interface(self): self.assertRaises(NotImplementedException, lambda: instance.buildPacket(x_base)) def test_modbus_slave_context_interface(self): - """Test that the base class isn"t implemented""" + """Test that the base class isn't implemented""" x_base = None instance = IModbusSlaveContext() self.assertRaises(NotImplementedException, instance.reset) @@ -74,7 +74,7 @@ def test_modbus_slave_context_interface(self): ) def test_modbus_payload_builder_interface(self): - """Test that the base class isn"t implemented""" + """Test that the base class isn't implemented""" instance = IPayloadBuilder() self.assertRaises( NotImplementedException, diff --git a/test/test_server_asyncio.py b/test/test_server_asyncio.py index 2584b20a1..133a40223 100755 --- a/test/test_server_asyncio.py +++ b/test/test_server_asyncio.py @@ -219,7 +219,7 @@ async def test_async_tcp_server_serve_forever_twice(self): await self.server.serve_forever() async def test_async_tcp_server_receive_data(self): - """Test data sent on socket is received by internals - doesn"t not process data""" + """Test data sent on socket is received by internals - doesn't not process data""" BasicClient.data = b"\x01\x00\x00\x00\x00\x06\x01\x03\x00\x00\x00\x19" await self.start_server() with patch(