From fed599663ac19688bc6dd326864d9e0daaf79771 Mon Sep 17 00:00:00 2001 From: Knut Nergaard Date: Thu, 14 Nov 2024 17:09:30 +0100 Subject: [PATCH] Solve mypy errors. (#770) --- Lib/fontParts/base/color.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Lib/fontParts/base/color.py b/Lib/fontParts/base/color.py index a4baad03..e3f170ae 100644 --- a/Lib/fontParts/base/color.py +++ b/Lib/fontParts/base/color.py @@ -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, ) @@ -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)