Skip to content

Commit

Permalink
Fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser committed Oct 25, 2024
1 parent 358914e commit 6d886b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions coloraide/algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def round_half_up(n: float, scale: int = 0) -> float:
def round_to(f: float, p: int = 0, half_up: bool = True) -> float:
"""Round to the specified precision using "half up" rounding."""

_round = round_half_up if half_up else round # type: Callable[..., float] # type: ignore[assignment]
_round = round_half_up if half_up else round # type: Callable[..., float]

# Do no rounding, just return a float with full precision
if p == -1:
Expand Down Expand Up @@ -2235,7 +2235,7 @@ def ndindex(*s: ShapeLike) -> Iterator[tuple[int, ...]]:
"""Iterate dimensions."""

yield from it.product(
*(range(d) for d in (s[0] if not isinstance(s[0], int) and len(s) == 1 else s)) # type: ignore[call-overload]
*(range(d) for d in (s[0] if not isinstance(s[0], int) and len(s) == 1 else s)) # type: ignore[arg-type]
)


Expand Down

0 comments on commit 6d886b3

Please sign in to comment.