Skip to content

Commit

Permalink
Autoupdate .pre-commit-config.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed May 1, 2024
1 parent 9d7995f commit 790bf53
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 29 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-json
Expand All @@ -10,17 +10,17 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 23.1.0
rev: 24.4.2
hooks:
- id: black

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies:
Expand Down
18 changes: 6 additions & 12 deletions src/javaproperties/reading.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,15 @@


@overload
def load(fp: IO) -> dict[str, str]:
...
def load(fp: IO) -> dict[str, str]: ...


@overload
def load(fp: IO, object_pairs_hook: type[T]) -> T:
...
def load(fp: IO, object_pairs_hook: type[T]) -> T: ...


@overload
def load(fp: IO, object_pairs_hook: Callable[[Iterator[tuple[str, str]]], T]) -> T:
...
def load(fp: IO, object_pairs_hook: Callable[[Iterator[tuple[str, str]]], T]) -> T: ...


def load(fp, object_pairs_hook=dict): # type: ignore[no-untyped-def]
Expand Down Expand Up @@ -58,20 +55,17 @@ def load(fp, object_pairs_hook=dict): # type: ignore[no-untyped-def]


@overload
def loads(s: str | bytes) -> dict[str, str]:
...
def loads(s: str | bytes) -> dict[str, str]: ...


@overload
def loads(s: str | bytes, object_pairs_hook: type[T]) -> T:
...
def loads(s: str | bytes, object_pairs_hook: type[T]) -> T: ...


@overload
def loads(
s: str | bytes, object_pairs_hook: Callable[[Iterator[tuple[str, str]]], T]
) -> T:
...
) -> T: ...


def loads(s, object_pairs_hook=dict): # type: ignore[no-untyped-def]
Expand Down
20 changes: 8 additions & 12 deletions src/javaproperties/xmlprops.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,17 @@


@overload
def load_xml(fp: IO) -> dict[str, str]:
...
def load_xml(fp: IO) -> dict[str, str]: ...


@overload
def load_xml(fp: IO, object_pairs_hook: type[T]) -> T:
...
def load_xml(fp: IO, object_pairs_hook: type[T]) -> T: ...


@overload
def load_xml(fp: IO, object_pairs_hook: Callable[[Iterator[tuple[str, str]]], T]) -> T:
...
def load_xml(
fp: IO, object_pairs_hook: Callable[[Iterator[tuple[str, str]]], T]
) -> T: ...


def load_xml(fp, object_pairs_hook=dict): # type: ignore[no-untyped-def]
Expand Down Expand Up @@ -53,20 +52,17 @@ def load_xml(fp, object_pairs_hook=dict): # type: ignore[no-untyped-def]


@overload
def loads_xml(s: AnyStr) -> dict[str, str]:
...
def loads_xml(s: AnyStr) -> dict[str, str]: ...


@overload
def loads_xml(fp: IO, object_pairs_hook: type[T]) -> T:
...
def loads_xml(fp: IO, object_pairs_hook: type[T]) -> T: ...


@overload
def loads_xml(
s: AnyStr, object_pairs_hook: Callable[[Iterator[tuple[str, str]]], T]
) -> T:
...
) -> T: ...


def loads_xml(s, object_pairs_hook=dict): # type: ignore[no-untyped-def]
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ max-doc-length = 100
max-line-length = 100
unused-arguments-ignore-stub-functions = True
extend-select = B901,B902,B950
ignore = A003,B005,E203,E262,E266,E501,U101,W503
ignore = A003,A005,B005,E203,E262,E266,E501,E704,U101,W503

[isort]
atomic = True
Expand Down

0 comments on commit 790bf53

Please sign in to comment.