Skip to content

Commit

Permalink
🧪 Added more tools from the 'pygrep-hooks' pre-commit hook (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-weigand authored Sep 11, 2021
1 parent 9d49c12 commit 9892b6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ repos:
rev: v1.9.0
hooks:
- id: rst-backticks
- id: python-check-blanket-noqa
exclude: "docs|tests?"
- id: python-check-blanket-type-ignore
exclude: "docs|tests?"
- id: python-use-type-annotations
- id: rst-directive-colons
- id: rst-inline-touching-normal

- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
Expand Down
4 changes: 2 additions & 2 deletions glotaran/deprecation/deprecation_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def parse_version(version_str: str) -> tuple[int, int, int]:
if len(split_version) < 3:
raise ValueError(error_message)
try:
return tuple(map(int, split_version[:3])) # type:ignore [return-value]
return tuple(map(int, split_version[:3])) # type:ignore[return-value]
except ValueError:
raise ValueError(error_message)

Expand Down Expand Up @@ -346,7 +346,7 @@ def outer_wrapper(deprecated_object: DecoratedCallable) -> DecoratedCallable:
setattr(
deprecated_object,
"__new__",
inject_warn_into_call(deprecated_object.__new__), # type: ignore [arg-type]
inject_warn_into_call(deprecated_object.__new__), # type: ignore[arg-type]
)
return deprecated_object # type: ignore[return-value]

Expand Down

0 comments on commit 9892b6e

Please sign in to comment.