Skip to content

Commit

Permalink
refactor(filesystem): resolve one comment
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Jun 18, 2024
1 parent 4dd9d99 commit d7c0918
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import typing as t

from antarest.study.storage.rawstudy.model.filesystem.folder_node import FolderNode
from antarest.study.storage.rawstudy.model.filesystem.inode import TREE
from antarest.study.storage.rawstudy.model.filesystem.root.output.simulation.mode.common.areas import (
Expand All @@ -15,15 +13,7 @@
OutputSimulationModeMcAllGrid,
)


class OutputMappingType(t.TypedDict):
areas: t.Type[OutputSimulationAreas]
grid: t.Type[OutputSimulationModeMcAllGrid]
links: t.Type[OutputSimulationLinks]
binding_constraints: t.Type[OutputSimulationBindingConstraintItem]


OUTPUT_MAPPING: OutputMappingType = {
OUTPUT_MAPPING = {
"areas": OutputSimulationAreas,
"grid": OutputSimulationModeMcAllGrid,
"links": OutputSimulationLinks,
Expand All @@ -38,5 +28,5 @@ def build(self) -> TREE:
children: TREE = {}
for key, simulation_class in OUTPUT_MAPPING.items():
if (self.config.path / key).exists():
children[key] = simulation_class(self.context, self.config.next_file(key)) # type: ignore
children[key] = simulation_class(self.context, self.config.next_file(key))
return children

0 comments on commit d7c0918

Please sign in to comment.