@@ -119,9 +119,9 @@ def calculate_eta_and_max_diff(
119119 weight_a = bandsdata_a .get ("weights" )
120120 weight_b = bandsdata_b .get ("weights" )
121121 weight = weight_a
122- assert np .allclose (
123- weight_a , weight_b
124- ), "Different weight of kpoints of two calculation."
122+ assert np .allclose (weight_a , weight_b ), (
123+ "Different weight of kpoints of two calculation."
124+ )
125125
126126 bands_a = bandsdata_a .get ("bands" )
127127 bands_b = bandsdata_b .get ("bands" )
@@ -205,10 +205,11 @@ def get_bands_distance(
205205 # swap to make sure a is less electrons pseudo
206206 bandsdata_a , bandsdata_b = bandsdata_b , bandsdata_a
207207
208- assert (
209- int (bandsdata_b ["number_of_electrons" ])
210- >= int (bandsdata_a ["number_of_electrons" ])
211- ), f"Need to be less num_bands in a { bandsdata_a ['number_of_electrons' ]} than b { bandsdata_b ['number_of_electrons' ]} "
208+ assert int (bandsdata_b ["number_of_electrons" ]) >= int (
209+ bandsdata_a ["number_of_electrons" ]
210+ ), (
211+ f"Need to be less num_bands in a { bandsdata_a ['number_of_electrons' ]} than b { bandsdata_b ['number_of_electrons' ]} "
212+ )
212213
213214 num_electrons_a = int (bandsdata_a ["number_of_electrons" ])
214215 num_electrons_b = int (bandsdata_b ["number_of_electrons" ])
@@ -238,9 +239,9 @@ def get_bands_distance(
238239
239240 # after cut and align in retrive band, the shapes are same now
240241 # import ipdb; ipdb.set_trace()
241- assert np .shape (bandsdata_a ["bands" ]) == np .shape (
242- bandsdata_b [" bands" ]
243- ), f' { np . shape ( bandsdata_a [ "bands" ]) } != { np . shape ( bandsdata_b [ "bands" ]) } '
242+ assert np .shape (bandsdata_a ["bands" ]) == np .shape (bandsdata_b [ "bands" ]), (
243+ f" { np . shape ( bandsdata_a [ 'bands' ]) } != { np . shape ( bandsdata_b [' bands' ]) } "
244+ )
244245
245246 # eta_v
246247 fermi_shift_v = 0.0
0 commit comments