diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 00355d2..e0b7c0a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.6.0 hooks: - id: end-of-file-fixer - id: trailing-whitespace @@ -35,45 +35,45 @@ repos: - id: detect-private-key - repo: https://github.com/asottile/pyupgrade - rev: v3.3.1 + rev: v3.16.0 hooks: - id: pyupgrade args: [--py36-plus] name: Upgrade code - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort name: imports require_serial: false - repo: https://github.com/kynan/nbstripout - rev: 0.6.1 + rev: 0.7.1 hooks: - id: nbstripout - repo: https://github.com/PyCQA/docformatter - rev: v1.6.2 + rev: v1.7.5 hooks: - id: docformatter args: [--in-place, --wrap-summaries=115, --wrap-descriptions=120] - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 24.4.2 hooks: - id: black name: Format code - repo: https://github.com/asottile/blacken-docs - rev: 1.13.0 + rev: 1.18.0 hooks: - id: blacken-docs args: [ --line-length=120, --skip-errors ] - - repo: https://github.com/charliermarsh/ruff-pre-commit + - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: 'v0.0.262' + rev: 'v0.5.0' hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/alfort/app.py b/alfort/app.py index 07d0bac..0e05683 100644 --- a/alfort/app.py +++ b/alfort/app.py @@ -112,12 +112,10 @@ def __init__( @abstractmethod def create_element( self, tag: str, props: Props, children: list[N], dispatch: Dispatch[M] - ) -> N: - ... + ) -> N: ... @abstractmethod - def create_text(self, text: str, dispatch: Dispatch[M]) -> N: - ... + def create_text(self, text: str, dispatch: Dispatch[M]) -> N: ... def _patch_children( self, diff --git a/alfort/vdom.py b/alfort/vdom.py index 8c12b87..a2bda52 100644 --- a/alfort/vdom.py +++ b/alfort/vdom.py @@ -32,8 +32,7 @@ class PatchText: class Node(Protocol): - def apply(self, patch: Patch) -> None: - ... + def apply(self, patch: Patch) -> None: ... @dataclass(slots=True, frozen=True) @@ -44,8 +43,7 @@ class Element(Generic[T]): @dataclass(slots=True, frozen=True) -class VDomElement(Element["VDom"]): - ... +class VDomElement(Element["VDom"]): ... VDom = VDomElement | str