Skip to content

Commit

Permalink
fix outdated annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
benkiel committed Nov 2, 2024
1 parent 33e45f2 commit 7bdecc9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Lib/fontParts/base/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
from fontParts.base.color import Color
from fontParts.base.deprecated import DeprecatedLayer, RemovedLayer
from fontParts.base.annotations import (
CharacterMappingType,
QuadrupleCollectionType,
CollectionType,
ColorType,
FactorType,
TransformationType,
ReverseComponentMappingType,
)

Expand Down Expand Up @@ -780,19 +780,19 @@ def _set_name(self, value: str, **kwargs: Any) -> None:
""",
)

def _get_base_color(self) -> ColorType:
def _get_base_color(self) -> QuadrupleCollectionType[IntFloatType]:
value = self._get_color()
if value is not None:
value = normalizers.normalizeColor(value)
value = Color(value)
return value

def _set_base_color(self, value: ColorType) -> None:
def _set_base_color(self, value: QuadrupleCollectionType[IntFloatType]) -> None:
if value is not None:
value = normalizers.normalizeColor(value)
self._set_color(value)

def _get_color(self) -> ColorType: # type: ignore[return]
def _get_color(self) -> QuadrupleCollectionType[IntFloatType]: # type: ignore[return]
"""Get the color of the layer.
This is the environment implementation of
Expand All @@ -811,7 +811,7 @@ def _get_color(self) -> ColorType: # type: ignore[return]
"""
self.raiseNotImplementedError()

def _set_color(self, value: ColorType, **kwargs: Any) -> None:
def _set_color(self, value: QuadrupleCollectionType[IntFloatType], **kwargs: Any) -> None:
r"""Get or set the color of the layer.
This is the environment implementation of
Expand Down Expand Up @@ -979,7 +979,7 @@ def _autoUnicodes(self) -> None:

def interpolate(
self,
factor: FactorType,
factor: TransformationType,
minLayer: BaseLayer,
maxLayer: BaseLayer,
round: bool = True,
Expand Down Expand Up @@ -1036,7 +1036,7 @@ def interpolate(

def _interpolate(
self,
factor: FactorType,
factor: TransformationType,
minLayer: BaseLayer,
maxLayer: BaseLayer,
round: bool,
Expand Down

0 comments on commit 7bdecc9

Please sign in to comment.