File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 11# default owners
2- * @ albrja @ collijk @ hussain-jafari @ patricktnast @ rmudambi @ stevebachmeier
2+ * @ albrja @ hussain-jafari @ patricktnast @ rmudambi @ stevebachmeier
Original file line number Diff line number Diff line change 1- **3.3.7 - 02/26 /25 **
1+ **3.3.7 - 02/27 /25 **
22
3+ - Change Event class to a frozen dataclass
34 - Type-hinting: Fix mypy errors in tests/framework/population/test_population_view.py
45
56**3.3.6 - 02/25/25 **
Original file line number Diff line number Diff line change 2929from __future__ import annotations
3030
3131from collections .abc import Callable
32+ from dataclasses import dataclass
3233from datetime import datetime , timedelta
33- from typing import TYPE_CHECKING , Any , NamedTuple
34+ from typing import TYPE_CHECKING , Any
3435
3536import pandas as pd
3637
4243 from vivarium .framework .engine import Builder
4344
4445
45- class Event (NamedTuple ):
46+ @dataclass (frozen = True )
47+ class Event :
4648 """An Event object represents the context of an event.
4749
4850 Events themselves are just a bundle of data. They must be emitted
4951 along an :class:`EventChannel` in order for other simulation components
5052 to respond to them.
5153 """
5254
53- # FIXME [MIC-5468]: fix index type hint for mypy
54- index : pd .Index [int ] # type: ignore[assignment]
55+ index : pd .Index [int ]
5556 """An index into the population table containing all simulants affected by this event."""
5657 user_data : dict [str , Any ]
5758 """Any additional data provided by the user about the event."""
You can’t perform that action at this time.
0 commit comments