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 #88

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
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand Down
6 changes: 2 additions & 4 deletions alfort/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 2 additions & 4 deletions alfort/vdom.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -44,8 +43,7 @@ class Element(Generic[T]):


@dataclass(slots=True, frozen=True)
class VDomElement(Element["VDom"]):
...
class VDomElement(Element["VDom"]): ...


VDom = VDomElement | str
Expand Down
Loading