Skip to content

Commit

Permalink
Format fixes by ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
knutnergaard authored and github-actions[bot] committed Dec 5, 2024
1 parent 8f81795 commit 778a232
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 16 deletions.
27 changes: 14 additions & 13 deletions Lib/fontParts/base/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class BaseComponent(
inserted as part of an outline.
"""

copyAttributes: Tuple[str, str] = ("baseGlyph", "transformation")

def _reprContents(self) -> List[str]:
Expand Down Expand Up @@ -227,7 +228,7 @@ def _set_baseGlyph(self, value: str) -> None:
:return: A :ref:`type-transformation` value representing the
transformation matrix of the component.
"""
""",
)

def _get_base_transformation(self) -> SextupleType[float]:
Expand Down Expand Up @@ -288,7 +289,7 @@ def _set_transformation(self, value: SextupleCollectionType[IntFloatType]) -> No
:return: A :ref:`type-coordinate.` representing the offset of the component.
"""
""",
)

def _get_base_offset(self) -> PairType[IntFloatType]:
Expand Down Expand Up @@ -348,7 +349,7 @@ def _set_offset(self, value: PairCollectionType[IntFloatType]) -> None:
:return: A :class:`tuple` of two :class:`float` items representing the
``(x, y)`` scale of the component.
"""
""",
)

def _get_base_scale(self) -> PairType[float]:
Expand Down Expand Up @@ -416,7 +417,7 @@ def _set_scale(self, value: PairCollectionType[IntFloatType]) -> None:
:raise FontPartsError: If attempting to set the index while the
component does not belong to a glyph.
"""
""",
)

def _get_base_index(self) -> Optional[int]:
Expand Down Expand Up @@ -739,18 +740,18 @@ def _get_base_bounds(self) -> QuadrupleType[float]:
def _get_bounds(self) -> QuadrupleType[float]:
"""Get the bounds of the component.
This is the environment implementation of the :attr:`BaseComponent.bounds`
property getter.
This is the environment implementation of the :attr:`BaseComponent.bounds`
property getter.
:return: A :class:`tuple` of four :class:`int` or :class:`float` values
in the form ``(x minimum, y minimum, x maximum, y maximum)``
representing the bounds of the component, or :obj:`None` if the
component is empty. The value will be normalized
with :func:`normalizers.normalizeBoundingBox`.
:return: A :class:`tuple` of four :class:`int` or :class:`float` values
in the form ``(x minimum, y minimum, x maximum, y maximum)``
representing the bounds of the component, or :obj:`None` if the
component is empty. The value will be normalized
with :func:`normalizers.normalizeBoundingBox`.
.. note::
.. note::
Subclasses may override this method.
Subclasses may override this method.
"""
pen = BoundsPen(self.layer)
Expand Down
4 changes: 3 additions & 1 deletion Lib/fontParts/base/font.py
Original file line number Diff line number Diff line change
Expand Up @@ -2058,7 +2058,9 @@ def _interpolate(

compatibilityReporterClass = FontCompatibilityReporter

def isCompatible(self, other: BaseFont, cls=None) -> Tuple[bool, FontCompatibilityReporter]:
def isCompatible(
self, other: BaseFont, cls=None
) -> Tuple[bool, FontCompatibilityReporter]:
"""Evaluate interpolation compatibility with another font.
This method will return a :class:`bool` indicating if the font is
Expand Down
4 changes: 3 additions & 1 deletion Lib/fontParts/base/glyph.py
Original file line number Diff line number Diff line change
Expand Up @@ -2795,7 +2795,9 @@ def _checkPairs(
reporter.warning = True
reporterObject.append(compatibility)

def isCompatible(self, other: BaseGlyph, cls=None) -> Tuple[bool, GlyphCompatibilityReporter]:
def isCompatible(
self, other: BaseGlyph, cls=None
) -> Tuple[bool, GlyphCompatibilityReporter]:
"""Evaluate interpolation compatibility with another glyph.
:param other: The other :class:`BaseGlyph` instance to check
Expand Down
4 changes: 3 additions & 1 deletion Lib/fontParts/base/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,9 @@ def _interpolate(

compatibilityReporterClass = LayerCompatibilityReporter

def isCompatible(self, other: BaseLayer, cls=None) -> Tuple[bool, LayerCompatibilityReporter]:
def isCompatible(
self, other: BaseLayer, cls=None
) -> Tuple[bool, LayerCompatibilityReporter]:
"""Evaluate interpolation compatibility with another layer.
:param other: The other :class:`BaseLayer` instance to check
Expand Down

0 comments on commit 778a232

Please sign in to comment.