diff --git a/pymodbus/server/async_io.py b/pymodbus/server/async_io.py index 6aa9a531be..8c22cf52d6 100644 --- a/pymodbus/server/async_io.py +++ b/pymodbus/server/async_io.py @@ -269,7 +269,7 @@ def __init__( broadcast_enable=False, response_manipulator=None, request_tracer=None, - **kwargs # pylint: disable=W0613 + **kwargs, # pylint: disable=unused-argument ): """Initialize the socket server. diff --git a/test/test_simulator.py b/test/test_simulator.py index 62c978ccd1..dc80d0c6b1 100644 --- a/test/test_simulator.py +++ b/test/test_simulator.py @@ -1,14 +1,15 @@ """Test datastore.""" import copy import json +from unittest.mock import mock_open, patch -from unittest.mock import patch, mock_open import pytest from pymodbus.datastore import ModbusSimulatorContext from pymodbus.datastore.simulator import Cell, CellType, Label from pymodbus.server import ModbusSimulatorServer + FX_READ_BIT = 1 FX_READ_REG = 3 FX_WRITE_BIT = 5 @@ -109,8 +110,8 @@ class TestSimulator: "VendorUrl": "https://github.com/pymodbus-dev/pymodbus/", "ProductName": "pymodbus Server", "ModelName": "pymodbus Server", - "MajorMinorRevision": "3.1.0" - } + "MajorMinorRevision": "3.1.0", + }, }, } @@ -562,8 +563,15 @@ def test_simulator_action_random(self, celltype, minval, maxval): async def test_init_simulator(self): """Test init simulator server""" - with patch("builtins.open", mock_open(read_data=json.dumps({ - "server_list": self.default_server_config, - "device_list": {"device": self.default_config}}) - )): + with patch( + "builtins.open", + mock_open( + read_data=json.dumps( + { + "server_list": self.default_server_config, + "device_list": {"device": self.default_config}, + } + ) + ), + ): ModbusSimulatorServer()