File tree Expand file tree Collapse file tree 8 files changed +19
-12
lines changed
_formula_engine/_formula_generators Expand file tree Collapse file tree 8 files changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ class BatteryPoolStatus:
7070 Send set of working and uncertain batteries, when the any battery change status.
7171 """
7272
73- def __init__ (
73+ def __init__ ( # noqa: DOC502 (RuntimeError is raised indirectly by BatteryStatus)
7474 self ,
7575 battery_ids : Set [int ],
7676 battery_status_sender : Sender [BatteryStatus ],
Original file line number Diff line number Diff line change @@ -443,7 +443,7 @@ async def _expect_category(
443443 f", not a { expected_category } ."
444444 )
445445
446- async def meter_data (
446+ async def meter_data ( # noqa: DOC502 (ValueError is raised indirectly by _expect_category)
447447 self ,
448448 component_id : int ,
449449 maxsize : int = RECEIVER_MAX_SIZE ,
@@ -473,7 +473,7 @@ async def meter_data(
473473 MeterData .from_proto ,
474474 ).new_receiver (maxsize = maxsize )
475475
476- async def battery_data (
476+ async def battery_data ( # noqa: DOC502 (ValueError is raised indirectly by _expect_category)
477477 self ,
478478 component_id : int ,
479479 maxsize : int = RECEIVER_MAX_SIZE ,
@@ -503,7 +503,7 @@ async def battery_data(
503503 BatteryData .from_proto ,
504504 ).new_receiver (maxsize = maxsize )
505505
506- async def inverter_data (
506+ async def inverter_data ( # noqa: DOC502 (ValueError is raised indirectly by _expect_category)
507507 self ,
508508 component_id : int ,
509509 maxsize : int = RECEIVER_MAX_SIZE ,
@@ -533,7 +533,7 @@ async def inverter_data(
533533 InverterData .from_proto ,
534534 ).new_receiver (maxsize = maxsize )
535535
536- async def ev_charger_data (
536+ async def ev_charger_data ( # noqa: DOC502 (ValueError is raised indirectly by _expect_category)
537537 self ,
538538 component_id : int ,
539539 maxsize : int = RECEIVER_MAX_SIZE ,
Original file line number Diff line number Diff line change 2525class CHPPowerFormula (FormulaGenerator [Power ]):
2626 """Formula generator for CHP Power."""
2727
28- def generate (self ) -> FormulaEngine [Power ]:
28+ def generate ( # noqa: DOC502 (FormulaGenerationError is raised indirectly by _get_chp_meters)
29+ self ,
30+ ) -> FormulaEngine [Power ]:
2931 """Make a formula for the cumulative CHP power of a microgrid.
3032
3133 The calculation is performed by adding the active power measurements from
Original file line number Diff line number Diff line change 1414class GridCurrentFormula (FormulaGenerator [Current ]):
1515 """Create a formula engine from the component graph for calculating grid current."""
1616
17- def generate (self ) -> FormulaEngine3Phase [Current ]:
17+ def generate ( # noqa: DOC502 (ComponentNotFound is raised indirectly by _get_grid_component_successors)
18+ self ,
19+ ) -> FormulaEngine3Phase [Current ]:
1820 """Generate a formula for calculating grid current from the component graph.
1921
2022 Returns:
Original file line number Diff line number Diff line change 1212class GridPowerFormula (FormulaGenerator [Power ]):
1313 """Creates a formula engine from the component graph for calculating grid power."""
1414
15- def generate (
15+ def generate ( # noqa: DOC502 (ComponentNotFound is raised indirectly by _get_grid_component_successors)
1616 self ,
1717 ) -> FormulaEngine [Power ]:
1818 """Generate a formula for calculating grid power from the component graph.
Original file line number Diff line number Diff line change 1717class PVPowerFormula (FormulaGenerator [Power ]):
1818 """Creates a formula engine for calculating the PV power production."""
1919
20- def generate (self ) -> FormulaEngine [Power ]:
20+ def generate ( # noqa: DOC502 (ComponentNotFound and RuntimeError are raised
21+ # indirectly by _get_pv_power_components)
22+ self ,
23+ ) -> FormulaEngine [Power ]:
2124 """Make a formula for the PV power production of a microgrid.
2225
2326 Returns:
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def load(path: str) -> OrderedRingBuffer[FloatArray] | None:
4545 return instance
4646
4747
48- def dump (
48+ def dump ( # noqa: DOC502 (OSError is raised indirectly by open and pickle.dump)
4949 ringbuffer : OrderedRingBuffer [FloatArray ],
5050 path : str ,
5151 file_format_version : int = FILE_FORMAT_VERSION ,
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ class LatestBatteryMetricsFetcher(LatestMetricsFetcher[BatteryData]):
169169 """Subscribe for the latest battery data using MicrogridApiClient."""
170170
171171 @classmethod
172- async def async_new (
172+ async def async_new ( # noqa: DOC502 (ValueError is raised indirectly super.async_new)
173173 cls ,
174174 component_id : int ,
175175 metrics : Iterable [ComponentMetricId ],
@@ -220,7 +220,7 @@ class LatestInverterMetricsFetcher(LatestMetricsFetcher[InverterData]):
220220 """Subscribe for the latest inverter data using MicrogridApiClient."""
221221
222222 @classmethod
223- async def async_new (
223+ async def async_new ( # noqa: DOC502 (ValueError is raised indirectly by super.async_new)
224224 cls ,
225225 component_id : int ,
226226 metrics : Iterable [ComponentMetricId ],
You can’t perform that action at this time.
0 commit comments