2929
3030
3131class TimeSeriesAttribute (Attribute ):
32- def __init__ (self , time_series : TimeSeries , attribute_meta : AttributeMeta ):
32+ def __init__ (self , time_series : TimeSeries [ float ] , attribute_meta : AttributeMeta ):
3333 self ._attribute_meta = attribute_meta
3434 self ._time_series = time_series
3535
36- def datapoints (self ) -> Iterable [tuple [datetime , float ]]: # type: ignore[override]
36+ def datapoints (self ) -> Iterable [tuple [Period , float ]]:
3737 return self ._time_series .datapoints ()
3838
3939 def get_meta (self ) -> AttributeMeta :
@@ -91,7 +91,7 @@ def get_electricity_production(self, unit: Unit) -> AttributeSet:
9191 ),
9292 )
9393 )
94- return AttributeSet (attributes ) # type: ignore[arg-type]
94+ return AttributeSet (attributes )
9595
9696 def get_maximum_electricity_production (self , unit : Unit ) -> AttributeSet :
9797 attributes = []
@@ -130,7 +130,7 @@ def get_maximum_electricity_production(self, unit: Unit) -> AttributeSet:
130130 ),
131131 )
132132 )
133- return AttributeSet (attributes ) # type: ignore[arg-type]
133+ return AttributeSet (attributes )
134134
135135 def get_storage_volumes (self , unit : Unit ) -> AttributeSet :
136136 attributes = []
@@ -155,7 +155,7 @@ def get_storage_volumes(self, unit: Unit) -> AttributeSet:
155155 ),
156156 )
157157 )
158- return AttributeSet (attributes ) # type: ignore[arg-type]
158+ return AttributeSet (attributes )
159159
160160 def get_category (self ) -> str :
161161 return self ._installation_dto .user_defined_category
@@ -248,7 +248,7 @@ def get_fuel_consumption(self) -> AttributeSet:
248248 )
249249 )
250250
251- return AttributeSet (attributes ) # type: ignore[arg-type]
251+ return AttributeSet (attributes )
252252
253253 def get_power_consumption (self , unit : Unit ) -> AttributeSet :
254254 attributes = []
@@ -325,14 +325,13 @@ def get_power_consumption(self, unit: Unit) -> AttributeSet:
325325 )
326326
327327 else :
328- # TODO: is this ok?
329328 logger .warning (
330329 f"A combination of one or more compressors that do not support fuel to power conversion was used."
331330 f"We are therefore unable to calculate correct power usage. Please only use compressors which support POWER conversion"
332331 f"for fuel consumer '{ fuel_consumer .name } '"
333332 )
334333
335- return AttributeSet (attributes ) # type: ignore[arg-type]
334+ return AttributeSet (attributes )
336335
337336 def get_emissions (self , unit : Unit ) -> AttributeSet :
338337 attributes = []
@@ -387,7 +386,7 @@ def get_emissions(self, unit: Unit) -> AttributeSet:
387386 )
388387 )
389388
390- return AttributeSet (attributes ) # type: ignore[arg-type]
389+ return AttributeSet (attributes )
391390
392391 def get_name (self ) -> str :
393392 return self ._installation_graph .graph .get_node_info (self ._installation_graph .graph .root ).name
0 commit comments