Skip to content

Commit a8bb9d0

Browse files
committed
Remove unused imports and rename function
1 parent 2732718 commit a8bb9d0

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

Diff for: backend/src/services/sumo_access/well_completions_access.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import itertools
2-
from typing import Dict, Iterator, List, Optional, Set, Tuple
1+
from typing import Dict, List, Optional, Set, Tuple
32

43
import pandas as pd
54

Diff for: frontend/src/modules/WellCompletions/utils/wellCompletionsDataAccessor.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export class WellCompletionsDataAccessor {
6767
// Extract all subzones
6868
this._subzones = [];
6969
this._data.zones.forEach((zone) =>
70-
WellCompletionsDataAccessor.buildZoneTreeAndAssignColor(zone, stratigraphyColorSet, this._subzones)
70+
WellCompletionsDataAccessor.createLeafNodesAndAssignColor(zone, stratigraphyColorSet, this._subzones)
7171
);
7272
}
7373

@@ -224,20 +224,20 @@ export class WellCompletionsDataAccessor {
224224
);
225225
}
226226

227-
private static buildZoneTreeAndAssignColor(
227+
private static createLeafNodesAndAssignColor(
228228
apiZone: WellCompletionsZone_api,
229229
stratigraphyColorSet: ColorSet,
230-
resultTree: Zone[]
230+
leafNodes: Zone[]
231231
): void {
232232
const color =
233-
resultTree.length === 0 ? stratigraphyColorSet.getFirstColor() : stratigraphyColorSet.getNextColor();
233+
leafNodes.length === 0 ? stratigraphyColorSet.getFirstColor() : stratigraphyColorSet.getNextColor();
234234

235235
// Depth-first search to find all leaf nodes
236236
if (!apiZone.subzones || apiZone.subzones.length === 0) {
237-
resultTree.push({ name: apiZone.name, color: color });
237+
leafNodes.push({ name: apiZone.name, color: color });
238238
} else {
239239
apiZone.subzones.forEach((apiSubZone) =>
240-
WellCompletionsDataAccessor.buildZoneTreeAndAssignColor(apiSubZone, stratigraphyColorSet, resultTree)
240+
WellCompletionsDataAccessor.createLeafNodesAndAssignColor(apiSubZone, stratigraphyColorSet, leafNodes)
241241
);
242242
}
243243
}

0 commit comments

Comments
 (0)