From c9b90e92c8d2a0cdc906dc808a17391fbbb5433f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 16:54:22 +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/python-poetry/poetry: 1.4.0 → 1.8.0](https://github.com/python-poetry/poetry/compare/1.4.0...1.8.0) - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v5.0.0) - [github.com/asottile/pyupgrade: v3.3.1 → v3.17.0](https://github.com/asottile/pyupgrade/compare/v3.3.1...v3.17.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.8.0](https://github.com/psf/black/compare/23.3.0...24.8.0) - [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.6.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.262...v0.6.9) --- .pre-commit-config.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) mode change 100755 => 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml old mode 100755 new mode 100644 index 41b3ac3..b6fbd8e --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,11 +24,11 @@ ci: repos: - repo: https://github.com/python-poetry/poetry - rev: '1.4.0' # add version here + rev: '1.8.0' # add version here hooks: - id: poetry-check - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: end-of-file-fixer - id: trailing-whitespace @@ -40,45 +40,45 @@ repos: - id: detect-private-key - repo: https://github.com/asottile/pyupgrade - rev: v3.3.1 + rev: v3.17.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.8.0 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.6.9' hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From c014d6aef67f2e1c4bc99ce53bec4ae56afe7a30 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 16:54:42 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- alfort_dom/dom.py | 9 +++------ docs/examples/todomvc/main.py | 6 ++---- stubs/pyodide/__init__.pyi | 26 +++++++++++++++++--------- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/alfort_dom/dom.py b/alfort_dom/dom.py index 46abc18..4862ae6 100644 --- a/alfort_dom/dom.py +++ b/alfort_dom/dom.py @@ -9,16 +9,13 @@ class HTMLElement(Protocol): - def focus(self) -> None: - ... + def focus(self) -> None: ... @property - def nodeValue(self) -> str: - ... + def nodeValue(self) -> str: ... @nodeValue.setter - def nodeValue(self, text: str) -> None: - ... + def nodeValue(self, text: str) -> None: ... def dom_effect( diff --git a/docs/examples/todomvc/main.py b/docs/examples/todomvc/main.py index ed76367..be2e139 100755 --- a/docs/examples/todomvc/main.py +++ b/docs/examples/todomvc/main.py @@ -96,8 +96,7 @@ class UpdateEntry: @dataclass(frozen=True) -class Add: - ... +class Add: ... @dataclass(frozen=True) @@ -106,8 +105,7 @@ class Delete: @dataclass(frozen=True) -class DeleteComplete: - ... +class DeleteComplete: ... @dataclass(frozen=True) diff --git a/stubs/pyodide/__init__.pyi b/stubs/pyodide/__init__.pyi index 6ad32a8..ff40492 100755 --- a/stubs/pyodide/__init__.pyi +++ b/stubs/pyodide/__init__.pyi @@ -12,11 +12,17 @@ class JsProxy(Any): self, *, depth: int = ..., - default_converter: Callable[ - ["JsProxy", Callable[["JsProxy"], Any], Callable[["JsProxy", Any], None]], - Any, - ] - | None = ..., + default_converter: ( + Callable[ + [ + "JsProxy", + Callable[["JsProxy"], Any], + Callable[["JsProxy", Any], None], + ], + Any, + ] + | None + ) = ..., ) -> Any: ... def then( self, onfulfilled: Callable[[Any], Any], onrejected: Callable[[Any], Any] @@ -41,10 +47,12 @@ def to_js( pyproxies: JsProxy | None = ..., create_pyproxies: bool = ..., dict_converter: Callable[[Iterable[JsProxy]], JsProxy] | None = ..., - default_converter: Callable[ - [Any, Callable[[Any], JsProxy], Callable[[Any, JsProxy], None]], JsProxy - ] - | None = ..., + default_converter: ( + Callable[ + [Any, Callable[[Any], JsProxy], Callable[[Any, JsProxy], None]], JsProxy + ] + | None + ) = ..., ) -> JsProxy: ... class Promise(JsProxy): ...