Skip to content

Commit b99de20

Browse files
committed
style: apply black formatting
1 parent 1f4c728 commit b99de20

6 files changed

Lines changed: 15 additions & 18 deletions

File tree

‎loopstructural/gui/map2loop_tools/sorter_widget.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,9 @@ def get_parameters(self):
500500
Dictionary of current widget parameters.
501501
"""
502502
algorithm_index = self.sortingAlgorithmComboBox.currentIndex()
503-
is_observation_projections = self.sorting_algorithms[algorithm_index] == "Observation projections"
503+
is_observation_projections = (
504+
self.sorting_algorithms[algorithm_index] == "Observation projections"
505+
)
504506

505507
params = {
506508
'sorting_algorithm': algorithm_index,

‎loopstructural/gui/modelling/geological_model_tab/feature_details_panel/_base.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,4 +742,3 @@ def schedule_rebuild(self):
742742
obs()
743743
except Exception:
744744
pass
745-

‎loopstructural/gui/modelling/geological_model_tab/layer_selection_table.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -543,9 +543,7 @@ def _setup_form_line_fields(self, layout):
543543
dip_layout = QFormLayout(self.dip_group)
544544

545545
self.constrain_dip_checkbox = QCheckBox("Also constrain dip (weak)")
546-
self.constrain_dip_checkbox.setChecked(
547-
self.existing_data.get('form_line_dip') is not None
548-
)
546+
self.constrain_dip_checkbox.setChecked(self.existing_data.get('form_line_dip') is not None)
549547
dip_layout.addRow(self.constrain_dip_checkbox)
550548

551549
self.dip_spin = QDoubleSpinBox()

‎loopstructural/main/m2l_api.py‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ def extract_basal_contacts(
328328
].reset_index(drop=True)
329329
if unit_colours and basal_contacts.empty is False and 'basal_unit' in basal_contacts.columns:
330330
colours_by_name = {str(name).strip(): colour for name, colour in unit_colours.items()}
331-
basal_contacts['colour'] = basal_contacts['basal_unit'].astype(str).str.strip().map(
332-
colours_by_name
331+
basal_contacts['colour'] = (
332+
basal_contacts['basal_unit'].astype(str).str.strip().map(colours_by_name)
333333
)
334334
if all_contacts:
335335
return {'basal_contacts': basal_contacts, 'all_contacts': all_contacts_result}
@@ -780,7 +780,9 @@ def calculate_thickness(
780780
"contacts can be calculated from the geology layer."
781781
)
782782
if updater:
783-
updater("The basal contacts layer has no features; calculating them from geology...")
783+
updater(
784+
"The basal contacts layer has no features; calculating them from geology..."
785+
)
784786
basal_contacts_gdf = None
785787
if basal_contacts_gdf is None:
786788
# No basal contacts layer supplied -- derive it from the geology
@@ -816,7 +818,9 @@ def calculate_thickness(
816818

817819
if updater:
818820
updater(f"Sampling basal contacts at spacing {sampling_frequency}...")
819-
sampler = SamplerSpacing(spacing=sampling_frequency, dtm_data=dtm_gdal, geology_data=geology_gdf)
821+
sampler = SamplerSpacing(
822+
spacing=sampling_frequency, dtm_data=dtm_gdal, geology_data=geology_gdf
823+
)
820824
sampled_contacts_gdf = sampler.sample(basal_contacts_gdf)
821825
if sampled_contacts_gdf is None or len(sampled_contacts_gdf) == 0:
822826
raise ValueError(

‎loopstructural/main/model_manager.py‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,9 +1328,7 @@ def update_model(
13281328
)
13291329
self._progress_callback = progress_callback
13301330
displacement_fault_count = len(set(self.faults) - set(self.fault_boundaries.values()))
1331-
self._progress_total = (
1332-
displacement_fault_count + group_count + len(self.manual_foliations)
1333-
)
1331+
self._progress_total = displacement_fault_count + group_count + len(self.manual_foliations)
13341332
self._progress_current = 0
13351333
dbg = getattr(self, '_debug_manager', None)
13361334
if dbg is not None:
@@ -1719,9 +1717,7 @@ def _build_manual_foliations(self):
17191717
self._create_foliation(name, **spec)
17201718
except Exception as e:
17211719
if self._debug_manager is not None:
1722-
self._debug_manager.log(
1723-
f"Could not build foliation '{name}': {e}", log_level=2
1724-
)
1720+
self._debug_manager.log(f"Could not build foliation '{name}': {e}", log_level=2)
17251721

17261722
def _create_foliation(
17271723
self,

‎tests/qgis/test_dem_function.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ def data_manager(tmp_path):
3636
_write_geographic_dem(path)
3737
dem_layer = QgsRasterLayer(str(path), "dem")
3838
assert dem_layer.isValid()
39-
manager = ModellingDataManager(
40-
project=QgsProject.instance(), mapCanvas=Mock(), logger=Mock()
41-
)
39+
manager = ModellingDataManager(project=QgsProject.instance(), mapCanvas=Mock(), logger=Mock())
4240
manager.set_model_manager(Mock())
4341
manager.set_model_crs(QgsCoordinateReferenceSystem(MODEL_CRS), use_project_crs=False)
4442
manager.set_dem_layer(dem_layer)

0 commit comments

Comments
 (0)