Skip to content

Commit d143cec

Browse files
committed
type hints
1 parent 214c7ed commit d143cec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pymodbus/datastore/simulator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def __init__(self, runtime):
107107
"""Initialize."""
108108
self.runtime = runtime
109109
self.config = {}
110-
self.config_types = {
110+
self.config_types: dict[str, dict[str, Any]] = {
111111
Label.type_bits: {
112112
Label.type: CellType.BITS,
113113
Label.next: None,
@@ -748,7 +748,7 @@ def action_uptime(cls, registers, inx, cell, **_kwargs):
748748
# Internal helper methods
749749
# --------------------------------------------
750750

751-
def validate_type(self, func_code, real_address, count):
751+
def validate_type(self, func_code, real_address, count) -> bool:
752752
"""Check if request is done against correct type.
753753
754754
:meta private:
@@ -762,7 +762,7 @@ def validate_type(self, func_code, real_address, count):
762762
check = (CellType.UINT16, CellType.STRING)
763763
reg_step = 1
764764
else:
765-
check = (CellType.UINT32, CellType.FLOAT32, CellType.STRING)
765+
check = (CellType.UINT32, CellType.FLOAT32, CellType.STRING) # type: ignore[assignment]
766766
reg_step = 2
767767

768768
for i in range(real_address, real_address + count, reg_step):

0 commit comments

Comments
 (0)