Skip to content

Commit 40fa142

Browse files
committed
fix: remove unused imports and clean up code
1 parent 7b036d5 commit 40fa142

File tree

8 files changed

+6
-16
lines changed

8 files changed

+6
-16
lines changed

loopstructural/gui/modelling/fault_adjacency_tab.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
QPushButton,
66
QTableWidget,
77
QTableWidgetItem,
8-
QTabWidget,
98
QVBoxLayout,
109
QWidget,
1110
)

loopstructural/gui/modelling/feature_details_panel.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
from PyQt5.QtCore import Qt
22
from PyQt5.QtWidgets import (
3-
QCheckBox,
43
QComboBox,
54
QDoubleSpinBox,
65
QFormLayout,
76
QLabel,
87
QScrollArea,
9-
QSlider,
108
QVBoxLayout,
119
QWidget,
1210
)

loopstructural/gui/modelling/model_definition/dem.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from PyQt5.QtWidgets import QWidget
44
from qgis.core import QgsMapLayerProxyModel
55
from qgis.PyQt import uic
6-
from qgis.PyQt.QtWidgets import QSizePolicy
76

87

98
class DEMWidget(QWidget):

loopstructural/gui/modelling/modelling_widget.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from xmlrpc.client import Fault
2-
31
from PyQt5.QtWidgets import QTabWidget, QVBoxLayout, QWidget
42

53
from loopstructural.gui.modelling.fault_adjacency_tab import FaultAdjacencyTab
@@ -32,7 +30,9 @@ def __init__(
3230
self, data_manager=self.data_manager
3331
)
3432
self.fault_adjacency_tab_widget = FaultAdjacencyTab(self, data_manager=self.data_manager)
35-
self.geological_model_tab_widget = GeologicalModelTab(self, model_manager=self.model_manager)
33+
self.geological_model_tab_widget = GeologicalModelTab(
34+
self, model_manager=self.model_manager
35+
)
3636

3737
mainLayout = QVBoxLayout(self)
3838
self.setLayout(mainLayout)

loopstructural/gui/visualisation/feature_list_widget.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from typing import Optional, Union
22

3-
from PyQt5.QtCore import Qt
43
from PyQt5.QtWidgets import QMenu, QPushButton, QTreeWidget, QTreeWidgetItem, QVBoxLayout, QWidget
54

65
from LoopStructural.datatypes import VectorPoints

loopstructural/gui/visualisation/object_list_widget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def remove_selected_object(self):
185185
if self.viewer and hasattr(self.viewer, 'remove_object'):
186186
self.viewer.remove_object(object_label)
187187
else:
188-
print(f"Error: Viewer is not initialized or does not support object removal.")
188+
print("Error: Viewer is not initialized or does not support object removal.")
189189
self.treeWidget.takeTopLevelItem(self.treeWidget.indexOfTopLevelItem(item))
190190

191191
def show_add_object_menu(self):

loopstructural/main/model_manager.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
from collections import defaultdict
2-
from collections.abc import Callable
3-
from operator import ne
42
from typing import Callable
53

64
import geopandas as gpd
@@ -228,8 +226,7 @@ def update_foliation_features(self):
228226
This method will automatically add unconformities based on the stratigraphic column.
229227
"""
230228
stratigraphic_column = {}
231-
unit_id = 0
232-
for i, group in enumerate(reversed(self.stratigraphic_column.get_groups())):
229+
for _i, group in enumerate(reversed(self.stratigraphic_column.get_groups())):
233230
val = 0
234231
data = []
235232
groupname = group.name
@@ -321,7 +318,7 @@ def valid(self):
321318
if len(self.stratigraphy) == 0:
322319
valid = False
323320
if len(self.faults) > 0:
324-
for fault_name, fault_data in self.faults.items():
321+
for _fault_name, fault_data in self.faults.items():
325322
if 'data' in fault_data and not fault_data['data'].empty:
326323
valid = True
327324
else:

loopstructural/toolbelt/preferences.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
# standard
66
from dataclasses import asdict, dataclass, fields
77

8-
from numpy import interp
9-
108
# PyQGIS
119
from qgis.core import QgsSettings
1210

0 commit comments

Comments
 (0)