-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Sbachmei/mic 5395/mypy event #516
Conversation
#: The simulation time at which this event will resolve. The current | ||
#: simulation size plus the current time step size. | ||
# FIXME [MIC-5468]: fix index type hint for mypy | ||
index: pd.Index[int] # type: ignore[assignment] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignored because NamedTuple has an index
method. We can either change the name of this attr or switch to a @dataclass(frozen=True)
@@ -113,7 +118,7 @@ def emit(self, index: pd.Index, user_data: Optional[Dict] = None) -> Event: | |||
e = Event( | |||
index, | |||
user_data, | |||
self.manager.clock() + self.manager.step_size(), | |||
self.manager.clock() + self.manager.step_size(), # type: ignore[operator, arg-type] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to sort out the clock type hints here. They include Number which don't all have add implemented.
Fix mypy errors in framework/event.py
Description
Changes and notes
Testing