diff --git a/src/antares/craft/model/area.py b/src/antares/craft/model/area.py index 2e1f03cb..cba3448d 100644 --- a/src/antares/craft/model/area.py +++ b/src/antares/craft/model/area.py @@ -196,7 +196,7 @@ def yield_area_ui(self) -> AreaUi: class Area: - def __init__( # TODO: Find a way to avoid circular imports + def __init__( self, name: str, area_service: BaseAreaService, @@ -258,7 +258,7 @@ def ui(self) -> AreaUi: def create_thermal_cluster( self, thermal_name: str, properties: Optional[ThermalClusterProperties] = None ) -> ThermalCluster: - thermal: ThermalCluster = self._area_service.create_thermal_cluster(self.id, thermal_name, properties) + thermal = self._area_service.create_thermal_cluster(self.id, thermal_name, properties) self._thermals[thermal.id] = thermal return thermal diff --git a/src/antares/craft/model/binding_constraint.py b/src/antares/craft/model/binding_constraint.py index daec839f..f87375ac 100644 --- a/src/antares/craft/model/binding_constraint.py +++ b/src/antares/craft/model/binding_constraint.py @@ -121,7 +121,7 @@ class BindingConstraintProperties(DefaultBindingConstraintProperties): class BindingConstraint: - def __init__( # TODO: Find a way to avoid circular imports + def __init__( self, name: str, binding_constraint_service: BaseBindingConstraintService, diff --git a/src/antares/craft/model/link.py b/src/antares/craft/model/link.py index 110e62ca..52a720b3 100644 --- a/src/antares/craft/model/link.py +++ b/src/antares/craft/model/link.py @@ -134,7 +134,7 @@ def yield_link_ui(self) -> LinkUi: class Link: - def __init__( # TODO: Find a way to avoid circular imports + def __init__( self, area_from: str, area_to: str, diff --git a/src/antares/craft/model/renewable.py b/src/antares/craft/model/renewable.py index 8ae45509..6e050f7c 100644 --- a/src/antares/craft/model/renewable.py +++ b/src/antares/craft/model/renewable.py @@ -91,7 +91,7 @@ def yield_renewable_cluster_properties(self) -> RenewableClusterProperties: class RenewableCluster: - def __init__( # TODO: Find a way to avoid circular imports + def __init__( self, renewable_service: BaseRenewableService, area_id: str, diff --git a/src/antares/craft/model/st_storage.py b/src/antares/craft/model/st_storage.py index 3c767022..4466774e 100644 --- a/src/antares/craft/model/st_storage.py +++ b/src/antares/craft/model/st_storage.py @@ -97,7 +97,7 @@ def __init__( area_id: str, name: str, properties: Optional[STStorageProperties] = None, - ): # TODO: Find a way to avoid circular imports + ): self._area_id: str = area_id self._storage_service: BaseShortTermStorageService = storage_service self._name: str = name diff --git a/src/antares/craft/model/thermal.py b/src/antares/craft/model/thermal.py index bf3f19ee..106e262b 100644 --- a/src/antares/craft/model/thermal.py +++ b/src/antares/craft/model/thermal.py @@ -178,7 +178,7 @@ def __init__( area_id: str, name: str, properties: Optional[ThermalClusterProperties] = None, - ): # TODO: Find a way to avoid circular imports + ): self._area_id = area_id self._thermal_service: BaseThermalService = thermal_service self._name = name diff --git a/src/antares/craft/service/local_services/renewable_local.py b/src/antares/craft/service/local_services/renewable_local.py index d502a4ca..3babf13f 100644 --- a/src/antares/craft/service/local_services/renewable_local.py +++ b/src/antares/craft/service/local_services/renewable_local.py @@ -40,7 +40,7 @@ def get_renewable_matrix(self, cluster_id: str, area_id: str) -> pd.DataFrame: ) def _extract_renewable_properties(self, renewable_data: dict[str, Any]) -> RenewableClusterProperties: - # get_type_hints will yield a dict with every property with every local property as key and its type as the value + # get_type_hints will yield a dict with every local property as key and its type as the value property_types = get_type_hints(RenewableClusterPropertiesLocal) # the name key is called "name" in renewable_data but "renewable_name" in the properties, that's why we map it