Skip to content

Commit

Permalink
Solve pylint error.
Browse files Browse the repository at this point in the history
  • Loading branch information
janiversen committed Jun 18, 2024
1 parent 4057780 commit 5cd3ae5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions pymodbus/datastore/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ def setValues(self, fc_as_hex: int, address: int, values: list[int | bool]) -> N
# Slave Contexts
# ---------------------------------------------------------------------------#
class ModbusSlaveContext(ModbusBaseSlaveContext):
"""
Create a modbus data model with each data access stored in a
block.
"""Create a modbus data model with data stored in a block.
:param di: discrete inputs initializer ModbusDataBlock
:param co: coils initializer ModbusDataBlock
Expand All @@ -91,12 +89,11 @@ class ModbusSlaveContext(ModbusBaseSlaveContext):
specification.
Default is False.
"""

def __init__(self, *_args, **kwargs):
"""Initialize the datastores.
"""
"""Initialize the datastores."""
self.store = {}
self.store["d"] = kwargs.get("di", ModbusSequentialDataBlock.create())
self.store["c"] = kwargs.get("co", ModbusSequentialDataBlock.create())
Expand Down

0 comments on commit 5cd3ae5

Please sign in to comment.