|
17 | 17 |
|
18 | 18 | from frequenz.channels import Broadcast, Sender |
19 | 19 |
|
| 20 | +from ..actor._actor import Actor |
20 | 21 | from ..microgrid.component import Component |
21 | 22 | from ..timeseries._grid_frequency import GridFrequency |
22 | 23 | from . import connection_manager |
|
29 | 30 | # |
30 | 31 | # pylint: disable=import-outside-toplevel |
31 | 32 | if typing.TYPE_CHECKING: |
32 | | - from ..actor import ( |
33 | | - ComponentMetricRequest, |
34 | | - ComponentMetricsResamplingActor, |
35 | | - DataSourcingActor, |
36 | | - ResamplerConfig, |
37 | | - ) |
| 33 | + from ..actor import ComponentMetricRequest, ResamplerConfig |
38 | 34 | from ..actor.power_distributing import ( # noqa: F401 (imports used by string type hints) |
39 | 35 | BatteryStatus, |
40 | 36 | PowerDistributingActor, |
|
52 | 48 | requests and will be able to keep up with higher request rates in larger installations. |
53 | 49 | """ |
54 | 50 |
|
55 | | -_T = typing.TypeVar("_T") |
56 | | -"""Type variable for generic actor types.""" |
57 | | - |
58 | 51 |
|
59 | 52 | @dataclass |
60 | | -class _ActorInfo(typing.Generic[_T]): |
| 53 | +class _ActorInfo: |
61 | 54 | """Holds instances of core data pipeline actors and their request channels.""" |
62 | 55 |
|
63 | | - actor: _T |
| 56 | + actor: Actor |
64 | 57 | """The actor instance.""" |
65 | 58 |
|
66 | 59 | channel: Broadcast[ComponentMetricRequest] |
@@ -90,10 +83,8 @@ def __init__( |
90 | 83 |
|
91 | 84 | self._channel_registry = ChannelRegistry(name="Data Pipeline Registry") |
92 | 85 |
|
93 | | - self._data_sourcing_actor: _ActorInfo[DataSourcingActor] | None = None |
94 | | - self._resampling_actor: _ActorInfo[ |
95 | | - ComponentMetricsResamplingActor |
96 | | - ] | None = None |
| 86 | + self._data_sourcing_actor: _ActorInfo | None = None |
| 87 | + self._resampling_actor: _ActorInfo | None = None |
97 | 88 |
|
98 | 89 | self._battery_status_channel = Broadcast["BatteryStatus"]( |
99 | 90 | "battery-status", resend_latest=True |
|
0 commit comments