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

[pre-commit.ci] pre-commit suggestions #74

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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: v4.6.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -40,45 +40,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]
Expand Down
9 changes: 3 additions & 6 deletions alfort_dom/dom.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 2 additions & 4 deletions docs/examples/todomvc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ class UpdateEntry:


@dataclass(frozen=True)
class Add:
...
class Add: ...


@dataclass(frozen=True)
Expand All @@ -106,8 +105,7 @@ class Delete:


@dataclass(frozen=True)
class DeleteComplete:
...
class DeleteComplete: ...


@dataclass(frozen=True)
Expand Down
26 changes: 17 additions & 9 deletions stubs/pyodide/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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): ...
Expand Down
Loading