@@ -57,13 +57,11 @@ def clean_merged_data(self):
5757 def get_subdirs (self ):
5858 return [x for x in os .listdir (self .path ) if x [0 ] != "." and x != "merged" ]
5959
60- def merge_datadict (
61- self , merged : dict [str , list | dict ], pending_data : dict [str , list | dict ]
62- ):
60+ def merge_datadict (self , merged , pending_data ):
6361 """Merge the content of pending_data into merged."""
6462 for key , info in pending_data .items ():
6563 if isinstance (info , list ):
66- # Append the list to the existing one.
64+ # Append the list to the existing one. We assume that on the left-hand-side we always have a list, so we ignore the type checking.
6765 merged [key ] += info
6866 elif isinstance (info , dict ):
6967 for param_name , params in info .items ():
@@ -149,14 +147,14 @@ def __init__(
149147 do_disc = True ,
150148 bias_error = "std" ,
151149 sigma_thresholds = [3.0 , 5.0 ],
152- background_from = None ,
150+ background_source = None ,
153151 ):
154152 self .sources = load_catalogue (rh_dict ["catalogue" ])
155153
156154 self .name = rh_dict ["name" ]
157155
158- if background_from is not None :
159- self .background_from = background_from
156+ if background_source is not None :
157+ self .background_from = background_source
160158 else :
161159 self .background_from = rh_dict ["name" ]
162160
0 commit comments