diff --git a/.gitignore b/.gitignore index 065d026c..6904f5e5 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ htmlcov/ pip-wheel-metadata/ src/21CMMC.egg-info/ devel/*.out +.vscode/ diff --git a/src/py21cmmc/likelihood.py b/src/py21cmmc/likelihood.py index e8bf0718..7249e142 100644 --- a/src/py21cmmc/likelihood.py +++ b/src/py21cmmc/likelihood.py @@ -918,15 +918,14 @@ def initialize_clik_and_class(self, name=None): my_l_max_EE = max(my_clik_EE.get_lmax()) else: raise AttributeError( - "I did not understand name %s"(name) - + "please choose between" - + "Planck_lensing, Planck_highl_TTTEEE, Planck_lowl_EE" + f"I did not understand name {name}. Please choose between" + "Planck_lensing, Planck_highl_TTTEEE, Planck_lowl_EE" ) except AttributeError: raise AttributeError( "The path to the .clik file for the likelihood " - "%s was not found where indicated:\n%s\n" % (name, my_path) - + " Note that the default path to search for it is" + f"{name} was not found where indicated: {my_path}\n" + " Note that the default path to search for it is" " one directory above the path['clik'] field. You" " can change this behaviour in all the " "Planck_something.data, to reflect your local configuration, " diff --git a/tests/test_zeus.py b/tests/test_zeus.py index 7411d13a..ac548083 100644 --- a/tests/test_zeus.py +++ b/tests/test_zeus.py @@ -9,7 +9,7 @@ def test_zeus(): core = p21mc.CoreCoevalModule( redshift=[7, 8, 9], - user_params=dict(HII_DIM=50, BOX_LEN=125.0), + user_params={"HII_DIM": 50, "BOX_LEN": 125.0}, regenerate=False, change_seed_every_iter=False, ) @@ -32,10 +32,10 @@ def test_zeus(): likelihood, datadir="data", model_name=model_name, - params=dict( - HII_EFF_FACTOR=[30.0, 10.0, 50.0, 3.0], - ION_Tvir_MIN=[4.7, 4, 6, 0.1], - ), + params={ + "HII_EFF_FACTOR": [30.0, 10.0, 50.0, 3.0], + "ION_Tvir_MIN": [4.7, 4, 6, 0.1], + }, reuse_burnin=False, continue_sampling=False, use_zeus=True,