diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ac31d86b..6e8e4943 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: trailing-whitespace exclude: src/exoplanet/theano_ops/lib/vendor @@ -14,7 +14,7 @@ repos: exclude: docs/tutorials - repo: https://github.com/PyCQA/isort - rev: "5.12.0" + rev: "5.13.2" hooks: - id: isort args: [] @@ -22,7 +22,7 @@ repos: exclude: docs/tutorials - repo: https://github.com/psf/black - rev: "23.9.1" + rev: "24.3.0" hooks: - id: black diff --git a/src/exoplanet/orbits/constants.py b/src/exoplanet/orbits/constants.py index 9249e884..0b508fea 100644 --- a/src/exoplanet/orbits/constants.py +++ b/src/exoplanet/orbits/constants.py @@ -22,11 +22,7 @@ day_per_yr_over_2pi = ( (1.0 * u.au) ** (3 / 2) - / ( - np.sqrt( - c.G.to(u.au**3 / (u.M_sun * u.day**2)) * (1.0 * u.M_sun) - ) - ) + / (np.sqrt(c.G.to(u.au**3 / (u.M_sun * u.day**2)) * (1.0 * u.M_sun))) ).value except TypeError: diff --git a/src/exoplanet/orbits/dur_to_ecc.py b/src/exoplanet/orbits/dur_to_ecc.py index 82f7128d..066fd2cd 100644 --- a/src/exoplanet/orbits/dur_to_ecc.py +++ b/src/exoplanet/orbits/dur_to_ecc.py @@ -39,9 +39,7 @@ def duration_to_eccentricity( s = tt.sin(kwargs["omega"]) umax_inv = tt.switch(tt.lt(s, 0), tt.sqrt(1 - s**2), 1.0) - const = ( - period * tt.shape_padright(r_star) * tt.sqrt((1 + ror) ** 2 - b**2) - ) + const = period * tt.shape_padright(r_star) * tt.sqrt((1 + ror) ** 2 - b**2) const /= np.pi * a u = duration / const