Skip to content

Commit

Permalink
No need to set variable twice
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser committed Sep 5, 2024
1 parent ef4bfa9 commit 2427f7b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions coloraide/compositing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
from . import blend_modes
from .. import algebra as alg
from ..channels import Channel
from typing import TYPE_CHECKING
from ..types import ColorInput, Vector
from typing import TYPE_CHECKING, Sequence

if TYPE_CHECKING: # pragma: no cover
from ..color import Color
Expand All @@ -18,11 +19,12 @@
def clip_channel(coord: float, channel: Channel) -> float:
"""Clipping channel."""

a = channel.low # type: float | None
b = channel.high # type: float | None
if channel.bound:
a = channel.low # type: float | None
b = channel.high # type: float | None

# These parameters are unbounded
if not channel.bound: # pragma: no cover
else: # pragma: no cover
# Will not execute unless we have a space that defines some coordinates
# as bound and others as not. We do not currently have such spaces.
a = None
Expand Down

0 comments on commit 2427f7b

Please sign in to comment.