@@ -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 (
0 commit comments