Fix some type checker errors by moving an assert above where the property is accessed

This commit is contained in:
Eryn Wells 2023-02-12 14:30:40 -08:00
parent a709f3fba5
commit 1aa6d14540

View file

@ -195,9 +195,9 @@ class Engine:
alternate_string)
while not result.done:
action = result.alternate
assert action is not None, f'Action {result.action} incomplete but no alternate action given'
assert result.alternate is not None, f'Action {result.action} incomplete but no alternate action given'
action = result.alternate
result = action.perform(self)
if log.ACTIONS_TREE.isEnabledFor(log.INFO) and self.map.visible[tuple(action.actor.position)]: