From 88f059fdd362ecc8c6b57a46ad4408d856a13537 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 16:46:57 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit suggestions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.6.0) - [github.com/asottile/pyupgrade: v3.3.1 → v3.16.0](https://github.com/asottile/pyupgrade/compare/v3.3.1...v3.16.0) - [github.com/PyCQA/isort: 5.12.0 → 5.13.2](https://github.com/PyCQA/isort/compare/5.12.0...5.13.2) - [github.com/kynan/nbstripout: 0.6.1 → 0.7.1](https://github.com/kynan/nbstripout/compare/0.6.1...0.7.1) - [github.com/PyCQA/docformatter: v1.6.2 → v1.7.5](https://github.com/PyCQA/docformatter/compare/v1.6.2...v1.7.5) - [github.com/psf/black: 23.3.0 → 24.4.2](https://github.com/psf/black/compare/23.3.0...24.4.2) - [github.com/asottile/blacken-docs: 1.13.0 → 1.18.0](https://github.com/asottile/blacken-docs/compare/1.13.0...1.18.0) - https://github.com/charliermarsh/ruff-pre-commit → https://github.com/astral-sh/ruff-pre-commit - [github.com/astral-sh/ruff-pre-commit: v0.0.262 → v0.5.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.262...v0.5.0) --- .pre-commit-config.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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] From 85bba5bbb08cf09f0d69ed32539e320650b48b0b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 16:47:16 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- alfort/app.py | 6 ++---- alfort/vdom.py | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) 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