From 189bcc1ac7e83933fe2ded41f006a29367c2f721 Mon Sep 17 00:00:00 2001 From: Colm Talbot Date: Tue, 19 Dec 2023 15:38:42 +0000 Subject: [PATCH] FORMAT: run precommits --- gwpopulation/vt.py | 2 +- test/backend_test.py | 1 + test/utils_test.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gwpopulation/vt.py b/gwpopulation/vt.py index 6f71afd7..93c8e150 100644 --- a/gwpopulation/vt.py +++ b/gwpopulation/vt.py @@ -138,7 +138,7 @@ def check_convergence(self, mu, var): converged = mu**2 > 4 * self.n_events * var return ( converged, - xp.nan_to_num(xp.inf * (1 - converged), nan=0, posinf=xp.inf) + xp.nan_to_num(xp.inf * (1 - converged), nan=0, posinf=xp.inf), ) def vt_factor(self, parameters): diff --git a/test/backend_test.py b/test/backend_test.py index ecaf8b3b..54e55a1f 100644 --- a/test/backend_test.py +++ b/test/backend_test.py @@ -45,6 +45,7 @@ def test_import_error_caught_for_mangled_install(): FIXME: figure out how to replace this with mock """ + def _import(module): raise ImportError diff --git a/test/utils_test.py b/test/utils_test.py index 1b316c71..3f60ee1b 100644 --- a/test/utils_test.py +++ b/test/utils_test.py @@ -156,6 +156,7 @@ def test_callable_condition_satisfied(): def test_non_callable_op_raises_error(): gwpopulation.set_backend("numpy") + @gwpopulation.utils.apply_conditions(dict(a=("ge", 0))) def _condition_func(a): return