From f3ce1f5d0efc536020c6d272c29853f0bef9fa03 Mon Sep 17 00:00:00 2001 From: James Bristow Date: Mon, 9 Sep 2024 18:13:06 +1200 Subject: [PATCH] fix: typing --- deeprootgen/model/hgraph.py | 10 ++++------ deeprootgen/model/root.py | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/deeprootgen/model/hgraph.py b/deeprootgen/model/hgraph.py index 1902a96..b8dc0cb 100644 --- a/deeprootgen/model/hgraph.py +++ b/deeprootgen/model/hgraph.py @@ -5,8 +5,6 @@ """ -# mypy: ignore-errors - from typing import List import networkx as nx @@ -56,11 +54,11 @@ def add_child_node( if new_organ: organ_id = self.G.increment_organ_id() segment_rank = 1 - order = self.node_data.order + 1 + order = self.node_data.order + 1 # type: ignore else: - organ_id = self.node_data.organ_id - segment_rank = self.node_data.segment_rank + 1 - order = self.node_data.order + organ_id = self.node_data.organ_id # type: ignore + segment_rank = self.node_data.segment_rank + 1 # type: ignore + order = self.node_data.order # type: ignore child_data.parent_id = self.node_data.node_id child_data.organ_id = organ_id diff --git a/deeprootgen/model/root.py b/deeprootgen/model/root.py index eb1c775..bf29340 100644 --- a/deeprootgen/model/root.py +++ b/deeprootgen/model/root.py @@ -630,7 +630,7 @@ def __init__( """ self.soil: Soil = Soil() self.G: RootSystemGraph = RootSystemGraph() - self.organs: Dict[str, List[RootOrgan]] = {} + self.organs: Dict[int, List[RootOrgan]] = {} self.simulation_tag = simulation_tag self.visualise = visualise self.rng = default_rng(random_seed)