Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump black from 23.11.0 to 24.3.0 #318

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/ufoLib2/objects/contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/ufoLib2/objects/info/woff.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions src/ufoLib2/objects/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 4 additions & 8 deletions src/ufoLib2/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand All @@ -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: ...
Loading