Skip to content

Commit

Permalink
Solve mypy errors. (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
knutnergaard authored Nov 14, 2024
1 parent 66ee188 commit fed5996
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Lib/fontParts/base/color.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
from __future__ import annotations
from typing import Union, List
from typing import Union

from fontParts.base.base import BaseObject
from fontParts.base.normalizers import normalizeColor
from fontParts.base.annotations import (
IntFloatType,
QuadrupleType,
QuadrupleCollectionType,
)

Expand All @@ -21,8 +19,8 @@ class Color(tuple):
def __new__(
cls, *args: Union[IntFloatType, QuadrupleCollectionType[IntFloatType]]
) -> Color:
value = tuple(args[0]) if len(args) == 1 else args
normalizedValue = normalizeColor(value)
value = args[0] if len(args) == 1 else args
normalizedValue = normalizeColor(value) # type: ignore[arg-type]

return super().__new__(cls, normalizedValue)

Expand Down

0 comments on commit fed5996

Please sign in to comment.