From 290af0ac9d6048d0f5f786b49fd3929f0eecfd29 Mon Sep 17 00:00:00 2001 From: yuyizh Date: Sat, 20 Mar 2021 14:15:44 +0800 Subject: [PATCH] reformat files with black --- tardis/base.py | 11 +++++++++-- tardis/simulation/base.py | 8 ++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tardis/base.py b/tardis/base.py index d4d44da34c7..55fcd9d766b 100644 --- a/tardis/base.py +++ b/tardis/base.py @@ -2,7 +2,11 @@ def run_tardis( - config, atom_data=None, packet_source=None, simulation_callbacks=[], virtual_packet_logging=False + config, + atom_data=None, + packet_source=None, + simulation_callbacks=[], + virtual_packet_logging=False, ): """ This function is one of the core functions to run TARDIS from a given @@ -43,7 +47,10 @@ def run_tardis( tardis_config = Configuration.from_config_dict(config) simulation = Simulation.from_config( - tardis_config, packet_source=packet_source, atom_data=atom_data, virtual_packet_logging=virtual_packet_logging + tardis_config, + packet_source=packet_source, + atom_data=atom_data, + virtual_packet_logging=virtual_packet_logging, ) for cb in simulation_callbacks: simulation.add_callback(*cb) diff --git a/tardis/simulation/base.py b/tardis/simulation/base.py index b8136a2ccfe..ae9f7aa7bc3 100644 --- a/tardis/simulation/base.py +++ b/tardis/simulation/base.py @@ -505,7 +505,9 @@ def remove_callback(self, id): return False @classmethod - def from_config(cls, config, packet_source=None, virtual_packet_logging=False, **kwargs): + def from_config( + cls, config, packet_source=None, virtual_packet_logging=False, **kwargs + ): """ Create a new Simulation instance from a Configuration object. @@ -545,7 +547,9 @@ def from_config(cls, config, packet_source=None, virtual_packet_logging=False, * runner = kwargs["runner"] else: runner = MontecarloRunner.from_config( - config, packet_source=packet_source, virtual_packet_logging=virtual_packet_logging + config, + packet_source=packet_source, + virtual_packet_logging=virtual_packet_logging, ) luminosity_nu_start = config.supernova.luminosity_wavelength_end.to(