From 29ea086579ad95a89b42c16a53a451892d7a6ba0 Mon Sep 17 00:00:00 2001 From: Metin San Date: Mon, 6 Nov 2023 14:47:57 +0100 Subject: [PATCH] Format with ruff --- zodipy/__init__.py | 7 +++---- zodipy/_emission.py | 2 +- zodipy/_interpolate_source.py | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/zodipy/__init__.py b/zodipy/__init__.py index beb24ca..876d739 100644 --- a/zodipy/__init__.py +++ b/zodipy/__init__.py @@ -1,3 +1,5 @@ +import contextlib + import pkg_resources from zodipy import comps, source_params @@ -5,10 +7,7 @@ from zodipy.model_registry import model_registry from zodipy.zodipy import Zodipy -try: - __version__ = pkg_resources.get_distribution(__name__).version -except pkg_resources.DistributionNotFound: # pragma: no cover - ... +contextlib.suppress(pkg_resources.DistributionNotFound) __all__ = ( "Zodipy", diff --git a/zodipy/_emission.py b/zodipy/_emission.py index bf586cf..e7465d2 100644 --- a/zodipy/_emission.py +++ b/zodipy/_emission.py @@ -16,7 +16,7 @@ from zodipy._ipd_dens_funcs import ComponentDensityFn """ -Function that return the zodiacal emission at a step along all lines of sight given +Function that return the zodiacal emission at a step along all lines of sight given a zodiacal model. """ GetCompEmissionAtStepFn = Callable[..., npt.NDArray[np.float64]] diff --git a/zodipy/_interpolate_source.py b/zodipy/_interpolate_source.py index ee584d1..9f72a46 100644 --- a/zodipy/_interpolate_source.py +++ b/zodipy/_interpolate_source.py @@ -15,7 +15,7 @@ "InterplanetaryDustModelT", bound=InterplanetaryDustModel ) -"""Return the source parameters for a given bandpass and model. +"""Return the source parameters for a given bandpass and model. Must match arguments in the emission fns.""" GetSourceParametersFn = Callable[ [Bandpass, InterplanetaryDustModelT, Callable],