Skip to content

Commit 947566c

Browse files
committed
Replace FormulaEngine subclasses with type aliases
This improves type compliance for that type. Signed-off-by: Sahas Subramanian <[email protected]>
1 parent f539389 commit 947566c

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

src/frequenz/sdk/timeseries/formula_engine/__init__.py

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,14 @@
44
"""Deprecated Formula Engine."""
55

66

7-
from typing_extensions import deprecated
7+
from typing_extensions import TypeAlias
88

99
from .._base_types import QuantityT
1010
from ..formulas._formula import Formula
1111
from ..formulas._formula_3_phase import Formula3Phase
1212

13-
14-
@deprecated(
15-
"The FormulaEngine class is deprecated and will be removed in a future release. "
16-
+ "Please use the Formula class instead."
17-
)
18-
class FormulaEngine(Formula[QuantityT]):
19-
"""Deprecated Formula Engine class.
20-
21-
This class is deprecated and will be removed in a future release.
22-
Please use the `Formula` and `Formula3Phase` classes directly.
23-
"""
24-
25-
26-
@deprecated(
27-
"The FormulaEngine3Phase class is deprecated and will be removed in a future release. "
28-
+ "Please use the Formula3Phase class instead."
29-
)
30-
class FormulaEngine3Phase(Formula3Phase[QuantityT]):
31-
"""Deprecated FormulaEngine3Phase class.
32-
33-
This class is deprecated and will be removed in a future release.
34-
Please use the `Formula3Phase` class directly.
35-
"""
13+
FormulaEngine: TypeAlias = Formula[QuantityT]
14+
FormulaEngine3Phase: TypeAlias = Formula3Phase[QuantityT]
3615

3716

3817
__all__ = ["FormulaEngine", "FormulaEngine3Phase"]

0 commit comments

Comments
 (0)