Skip to content

Commit

Permalink
chore(sonar): fix some sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Feb 5, 2025
1 parent 081b711 commit 0cb2443
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 6 additions & 9 deletions src/antares/craft/service/local_services/area_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,16 +379,13 @@ def read_areas(self) -> List[Area]:
self.config.study_path, InitializationFilesTypes.AREA_UI_INI, area_id=element.name
).ini_dict
thermal_area_dict = IniFile(self.config.study_path, InitializationFilesTypes.THERMAL_AREAS_INI).ini_dict
nodal_optimization = optimization_dict["nodal optimization"]
area_properties = AreaPropertiesLocal(
non_dispatch_power=optimization_dict["nodal optimization"].get("non-dispatchable-power"),
dispatch_hydro_power=optimization_dict["nodal optimization"].get("dispatchable-hydro-power"),
other_dispatch_power=optimization_dict["nodal optimization"].get("other-dispatchable-power"),
spread_unsupplied_energy_cost=optimization_dict["nodal optimization"].get(
"spread-unsupplied-energy-cost"
),
spread_spilled_energy_cost=optimization_dict["nodal optimization"].get(
"spread-spilled-energy-cost"
),
non_dispatch_power=nodal_optimization.get("non-dispatchable-power"),
dispatch_hydro_power=nodal_optimization.get("dispatchable-hydro-power"),
other_dispatch_power=nodal_optimization.get("other-dispatchable-power"),
spread_unsupplied_energy_cost=nodal_optimization.get("spread-unsupplied-energy-cost"),
spread_spilled_energy_cost=nodal_optimization.get("spread-spilled-energy-cost"),
energy_cost_unsupplied=thermal_area_dict["unserverdenergycost"].get(element.name),
energy_cost_spilled=thermal_area_dict["spilledenergycost"].get(element.name),
filter_synthesis=set(optimization_dict["filtering"].get("filter-synthesis").split(", ")),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ def read_renewables(self, area_id: str) -> List[RenewableCluster]:
return renewables_clusters

def update_renewable_matrix(self, renewable_cluster: RenewableCluster, matrix: pd.DataFrame) -> None:
pass
raise NotImplementedError

0 comments on commit 0cb2443

Please sign in to comment.