Skip to content

Commit

Permalink
Fix return-value
Browse files Browse the repository at this point in the history
  • Loading branch information
paddyroddy committed Oct 16, 2024
1 parent 57f2820 commit 205ae4c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions glass/lensing.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,10 @@ def deflect(
lon: npt.NDArray[np.float64],
lat: npt.NDArray[np.float64],
alpha: npt.NDArray[np.float64],
) -> npt.NDArray[np.float64]:
) -> tuple[
npt.NDArray[np.float64],
npt.NDArray[np.float64],
]:
r"""
Apply deflections to positions.
Expand Down Expand Up @@ -477,4 +480,4 @@ def deflect(

d = np.arctan2(sa * sg, st * ca - ct * sa * cg)

return lon - np.degrees(d), np.degrees(tp) # type: ignore[return-value]
return lon - np.degrees(d), np.degrees(tp)
4 changes: 2 additions & 2 deletions glass/shells.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ def combine(
z: npt.NDArray[np.float64],
weights: npt.NDArray[np.float64],
shells: collections.abc.Sequence[RadialWindow],
) -> npt.NDArray[np.float64]:
) -> int:
r"""
Evaluate a linear combination of window functions.
Expand Down Expand Up @@ -648,7 +648,7 @@ def combine(
Find weights for a given function.
"""
return sum( # type: ignore[return-value]
return sum(
np.expand_dims(weight, -1)
* np.interp(
z,
Expand Down

0 comments on commit 205ae4c

Please sign in to comment.