From 159998ee28407b3654eaf0415339a00dfb5f7b7b Mon Sep 17 00:00:00 2001 From: Johannes Buchner Date: Tue, 8 Oct 2024 20:49:37 +0200 Subject: [PATCH 1/2] handle python -OO --- cosmolopy/constants.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cosmolopy/constants.py b/cosmolopy/constants.py index 537295e..f198650 100644 --- a/cosmolopy/constants.py +++ b/cosmolopy/constants.py @@ -84,6 +84,7 @@ doc += " sigma_T_cm: Thomson cross section in Mpc^2\n" sigma_T_Mpc = sigma_T_cm / (Mpc_cm ** 2.) # Mpc^2 -__doc__ += "\n".join(sorted(doc.split("\n"))) +if __doc__ is not None: + __doc__ += "\n".join(sorted(doc.split("\n"))) From 73575294d75b5f515d4e81fa763a7a258eeabf97 Mon Sep 17 00:00:00 2001 From: Johannes Buchner Date: Tue, 8 Oct 2024 20:55:10 +0200 Subject: [PATCH 2/2] handle escape warning --- cosmolopy/distance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cosmolopy/distance.py b/cosmolopy/distance.py index f83bc95..52ec641 100644 --- a/cosmolopy/distance.py +++ b/cosmolopy/distance.py @@ -37,7 +37,7 @@ def set_omega_k_0(cosmo): """Returns the cosmo dictionary with omega_k_0 set. See get_omega_k_0. - Note that cosmo is not passed as \*\*cosmo for once. This function + Note that cosmo is not passed as \\*\\*cosmo for once. This function modifies the dictionary in place and returns the result. """