Skip to content

Commit dc7d8f2

Browse files
committed
fix: linting
1 parent a26fc49 commit dc7d8f2

File tree

5 files changed

+7
-21
lines changed

5 files changed

+7
-21
lines changed

loopstructural/gui/modelling/geological_model_tab/bounding_box_widget.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from PyQt5.QtCore import Qt
33
from PyQt5.QtWidgets import (
44
QGridLayout,
5-
QHBoxLayout,
65
QLabel,
76
QDoubleSpinBox,
87
QVBoxLayout,

loopstructural/gui/modelling/geological_model_tab/feature_details_panel.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import numpy as np
2-
from PyQt5.QtCore import Qt, QVariant
1+
from PyQt5.QtCore import Qt
32
from PyQt5.QtWidgets import (
43
QCheckBox,
54
QComboBox,
@@ -123,9 +122,7 @@ def addExportBlock(self):
123122

124123
# --- Per-feature export controls (for this panel's feature) ---
125124
try:
126-
from PyQt5.QtWidgets import QFormLayout, QHBoxLayout
127-
from PyQt5.QtWidgets import QGroupBox
128-
from qgis.core import QgsVectorLayer, QgsFeature, QgsFields, QgsField, QgsProject, QgsGeometry, QgsPointXYZ
125+
from PyQt5.QtWidgets import QFormLayout
129126
except Exception:
130127
# imports may fail outside QGIS environment; we'll handle at runtime
131128
pass
@@ -316,7 +313,7 @@ def _export_scalar_points(self):
316313
crs = self.data_manager.project.crs().authid()
317314
try:
318315
# QGIS imports (guarded)
319-
from qgis.core import QgsProject, QgsVectorLayer, QgsFeature, QgsGeometry, QgsPoint, QgsFields, QgsField
316+
from qgis.core import QgsProject, QgsVectorLayer, QgsFeature, QgsPoint, QgsField
320317
from qgis.PyQt.QtCore import QVariant
321318
except Exception as e:
322319
# Not running inside QGIS — nothing to do
@@ -328,12 +325,7 @@ def _export_scalar_points(self):
328325
if self.evaluate_target_combo.currentIndex() == 0:
329326
# use bounding-box resolution or custom nsteps
330327
logger.info('Using bounding box cell centres for evaluation')
331-
bb = None
332-
try:
333-
bb = getattr(self.model_manager.model, 'bounding_box', None)
334-
except Exception:
335-
bb = None
336-
328+
337329

338330

339331

@@ -428,7 +420,7 @@ def _export_scalar_points(self):
428420
attributes=attributes_df,
429421
crs=crs,
430422
)
431-
except Exception as e:
423+
except Exception:
432424
logger.debug('Failed to export feature values', exc_info=True)
433425
return
434426

loopstructural/gui/visualisation/loop_pyvistaqt_wrapper.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
import re
2-
from collections import defaultdict
31
from PyQt5.QtCore import pyqtSignal
42
from pyvistaqt import QtInteractor
53
from typing import Optional, Any, Dict, Tuple
6-
import pyvista as pv
74

85

96
class LoopPyVistaQTPlotter(QtInteractor):

loopstructural/gui/visualisation/object_list_widget.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def _on_vis(state, name=mesh_name, m=mesh):
9999
# Fallback: set on mesh if possible
100100
if hasattr(m, 'visibility'):
101101
try:
102-
setattr(m, 'visibility', checked)
102+
m.visibility = checked
103103
except Exception:
104104
pass
105105

@@ -179,7 +179,7 @@ def _on_visibility_change(state, name=object_name, inst=instance):
179179
# Fallback: set attribute on the instance if possible
180180
if inst is not None and hasattr(inst, 'visibility'):
181181
try:
182-
setattr(inst, 'visibility', checked)
182+
inst.visibility = checked
183183
except Exception:
184184
pass
185185

loopstructural/gui/visualisation/object_properties_widget.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,11 +824,9 @@ def _apply_scalar_to_actor(self, object_name: str, scalar_name: str):
824824
return
825825

826826
# resolve scalar name
827-
use_cell = False
828827
scalars = scalar_name
829828
if scalar_name.startswith('cell:'):
830829
scalars = scalar_name.split(':', 1)[1]
831-
use_cell = True
832830

833831
values = self._get_scalar_values(scalar_name)
834832
if values is None:

0 commit comments

Comments
 (0)