From 6d465a8995cdae0a7d1ddd5fa41f62f13de32f13 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Sat, 12 Oct 2024 13:39:29 +0200 Subject: [PATCH] Bump `pre-commit` hooks. --- .pre-commit-config.yaml | 8 ++++---- fontbro/font.py | 7 ++++--- fontbro/utils.py | 3 ++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cffdbda..d12d9d5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.16.0 + rev: v3.18.0 hooks: - id: pyupgrade args: ["--py310-plus"] @@ -14,21 +14,21 @@ repos: - id: fix-future-annotations - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.0 + rev: v0.6.9 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.10.1 + rev: v1.11.2 hooks: - id: mypy args: [--ignore-missing-imports, --strict] exclude: "tests" - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: fix-encoding-pragma args: [--remove] diff --git a/fontbro/font.py b/fontbro/font.py index 045b7f2..6ec2cba 100644 --- a/fontbro/font.py +++ b/fontbro/font.py @@ -10,7 +10,8 @@ from curses import ascii from io import BytesIO from pathlib import Path -from typing import Any, Generator +from typing import Any +from collections.abc import Generator from typing.io import IO import fsutil import ots @@ -485,7 +486,7 @@ def get_characters( self, *, ignore_blank: bool = False, - ) -> Generator[dict[str, Any], None, None]: + ) -> Generator[dict[str, Any]]: """ Gets the font characters. @@ -830,7 +831,7 @@ def get_format( def get_glyphs( self, - ) -> Generator[dict[str, Any], None, None]: + ) -> Generator[dict[str, Any]]: """ Gets the font glyphs and their own composition. diff --git a/fontbro/utils.py b/fontbro/utils.py index 6ea5e4b..0e03f4a 100644 --- a/fontbro/utils.py +++ b/fontbro/utils.py @@ -1,7 +1,8 @@ from __future__ import annotations import re import unicodedata -from typing import Any, Callable +from typing import Any +from collections.abc import Callable import fsutil