diff --git a/requirements-dev.txt b/requirements-dev.txt index 726f2b77..66e0312d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,7 +4,7 @@ # # pip-compile --output-file=requirements-dev.txt requirements-dev.in # -black==23.11.0 +black==24.3.0 # via -r requirements-dev.in click==8.1.7 # via black diff --git a/src/ufoLib2/objects/contour.py b/src/ufoLib2/objects/contour.py index 32b7cdaf..764ab056 100644 --- a/src/ufoLib2/objects/contour.py +++ b/src/ufoLib2/objects/contour.py @@ -54,8 +54,7 @@ def __delitem__(self, index: int | slice) -> None: del self.points[index] @overload - def __getitem__(self, index: int) -> Point: - ... + def __getitem__(self, index: int) -> Point: ... @overload def __getitem__(self, index: slice) -> list[Point]: # noqa: F811 diff --git a/src/ufoLib2/objects/info/woff.py b/src/ufoLib2/objects/info/woff.py index ac40e37a..aa328b70 100644 --- a/src/ufoLib2/objects/info/woff.py +++ b/src/ufoLib2/objects/info/woff.py @@ -2,6 +2,7 @@ https://unifiedfontobject.org/versions/ufo3/fontinfo.plist/#woff-data """ + from __future__ import annotations from typing import Any, List, Mapping, Optional, Sequence, Type, TypeVar diff --git a/src/ufoLib2/objects/layer.py b/src/ufoLib2/objects/layer.py index 35febb8d..faf227ae 100644 --- a/src/ufoLib2/objects/layer.py +++ b/src/ufoLib2/objects/layer.py @@ -228,12 +228,10 @@ def keys(self) -> KeysView[str]: return self._glyphs.keys() @overload - def pop(self, key: str) -> Glyph: - ... + def pop(self, key: str) -> Glyph: ... @overload - def pop(self, key: str, default: Glyph | T = ...) -> Glyph | T: - ... + def pop(self, key: str, default: Glyph | T = ...) -> Glyph | T: ... def pop(self, key: str, default: Glyph | T = KeyError) -> Glyph | T: # type: ignore """Remove and return glyph from layer. diff --git a/src/ufoLib2/typing.py b/src/ufoLib2/typing.py index 2747ba7c..242e1719 100644 --- a/src/ufoLib2/typing.py +++ b/src/ufoLib2/typing.py @@ -19,8 +19,7 @@ class Drawable(Protocol): See :mod:`fontTools.pens.basePen` for an introduction to pens. """ - def draw(self, pen: AbstractPen) -> None: - ... + def draw(self, pen: AbstractPen) -> None: ... class DrawablePoints(Protocol): @@ -29,8 +28,7 @@ class DrawablePoints(Protocol): See :mod:`fontTools.pens.pointPen` for an introduction to point pens. """ - def drawPoints(self, pen: AbstractPointPen) -> None: - ... + def drawPoints(self, pen: AbstractPointPen) -> None: ... class HasIdentifier(Protocol): @@ -54,8 +52,6 @@ class GlyphSet(Protocol): """ # "object" instead of "str" because that's what typeshed says a Mapping should have. - def __contains__(self, name: object) -> bool: - ... + def __contains__(self, name: object) -> bool: ... - def __getitem__(self, name: str) -> Drawable | DrawablePoints: - ... + def __getitem__(self, name: str) -> Drawable | DrawablePoints: ...