Skip to content

Conversation

@alexrudd2
Copy link
Collaborator

@alexrudd2 alexrudd2 commented Feb 24, 2024

This solves 8 more mypy errors, including a real problem in ModbusSparseDataBlock.

The method default() (inherited from ModbusBaseDataBlock) does not make any sense for a sparse datastore, where self.values is a dictionary. If called, it will break the implementation.
==> Move it to ModbusSequentialDataBlock.

Also, reset() is defined in ModbusBaseDataBlock but overridden by ModbusSparseDataBlock.
==> Move it also to ModbusSequentialDataBlock.

Copy link
Collaborator

@janiversen janiversen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

However it scares me a bit, that no tests were affected .... we really need a lot more testing.

@janiversen janiversen merged commit bf59f3c into dev Feb 24, 2024
@janiversen janiversen deleted the datastore branch February 24, 2024 17:27
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants