From 5e7a23be8115fd7743789d35f3dc12b1f074e157 Mon Sep 17 00:00:00 2001 From: Andrew Fullard Date: Mon, 29 Jul 2024 11:33:27 -0400 Subject: [PATCH] Black tardis --- tardis/plasma/tests/test_complete_plasmas.py | 4 +++- tardis/visualization/tools/sdec_plot.py | 14 +++++++++----- tardis/visualization/widgets/custom_abundance.py | 4 +++- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/tardis/plasma/tests/test_complete_plasmas.py b/tardis/plasma/tests/test_complete_plasmas.py index 80495fc2194..60f9ae85abc 100644 --- a/tardis/plasma/tests/test_complete_plasmas.py +++ b/tardis/plasma/tests/test_complete_plasmas.py @@ -167,7 +167,9 @@ def plasma( ): config["atom_data"] = str(chianti_he_db_fpath) sim = Simulation.from_config(config) - data = self.regression_data.sync_hdf_store(sim.plasma, update_fname=False) + data = self.regression_data.sync_hdf_store( + sim.plasma, update_fname=False + ) yield sim.plasma data.close() diff --git a/tardis/visualization/tools/sdec_plot.py b/tardis/visualization/tools/sdec_plot.py index 10ed51fa875..e306f141be5 100644 --- a/tardis/visualization/tools/sdec_plot.py +++ b/tardis/visualization/tools/sdec_plot.py @@ -791,9 +791,11 @@ def _calculate_plotting_data( # Need to add a new value to the mask array for the 'other' column just added mask = np.insert(mask, 0, True) # Then drop all of the individual columns for species included in 'other' - self.absorption_luminosities_df = self.absorption_luminosities_df.drop( - self.absorption_luminosities_df.keys()[~mask], - axis=1, + self.absorption_luminosities_df = ( + self.absorption_luminosities_df.drop( + self.absorption_luminosities_df.keys()[~mask], + axis=1, + ) ) # Get the list of species in the model @@ -837,8 +839,10 @@ def _calculate_plotting_data( ].sum(axis=1), ) # Then drop all of the individual columns for elements included in 'other' - self.absorption_luminosities_df = self.absorption_luminosities_df.drop( - sorted_list.keys()[nelements:], axis=1 + self.absorption_luminosities_df = ( + self.absorption_luminosities_df.drop( + sorted_list.keys()[nelements:], axis=1 + ) ) # Get the list of species in the model # Index from 1: to avoid the 'other' column diff --git a/tardis/visualization/widgets/custom_abundance.py b/tardis/visualization/widgets/custom_abundance.py index 8a3b62eb407..034cdab5f9e 100644 --- a/tardis/visualization/widgets/custom_abundance.py +++ b/tardis/visualization/widgets/custom_abundance.py @@ -787,7 +787,9 @@ def on_btn_add_shell(self, obj): if end_index < len(v_vals) and np.isclose(v_vals[end_index], v_end): # New shell will overwrite the original shell that ends at v_end. v_vals = np.delete(v_vals, end_index) - self.data.abundance = self.data.abundance.drop(max(0, end_index - 1), 1) + self.data.abundance = self.data.abundance.drop( + max(0, end_index - 1), 1 + ) # Insert new velocities calculate new densities according # to new velocities through interpolation.