Skip to content

Commit

Permalink
Merge pull request #323 from ISISComputingGroup/rerpha-patch-1
Browse files Browse the repository at this point in the history
Correct type hint for _get_initial_state()
  • Loading branch information
rerpha authored Jan 13, 2025
2 parents 27f1e70 + 1e87fd7 commit d164f39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lewis/devices/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def _get_state_handlers(self) -> dict[str, State]:
"_get_state_handlers must be implemented in a StateMachineDevice."
)

def _get_initial_state(self) -> State:
def _get_initial_state(self) -> str:
"""
Implement this method to return the initial state of the internal state machine.
The default implementation raises a ``NotImplementedError``.
Expand Down Expand Up @@ -198,7 +198,7 @@ def _override_data(self, overrides: dict[str, float] | None) -> None:
self.log.debug("Trying to override initial data (%s=%s)", name, val)
if name not in dir(self):
raise AttributeError(
"Can not override non-existing attribute" "'{}' of class '{}'.".format(
"Can not override non-existing attribute'{}' of class '{}'.".format(
name, type(self).__name__
)
)
Expand Down

0 comments on commit d164f39

Please sign in to comment.