[pre-commit.ci] pre-commit autoupdate (#12380)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.4 → v0.4.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.4...v0.4.5) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
88fae23bdd
commit
48cb8a2b32
|
@ -1,6 +1,6 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: "v0.4.4"
|
rev: "v0.4.5"
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
args: ["--fix"]
|
args: ["--fix"]
|
||||||
|
|
|
@ -199,8 +199,8 @@ class TracebackEntry:
|
||||||
rawentry: TracebackType,
|
rawentry: TracebackType,
|
||||||
repr_style: Optional['Literal["short", "long"]'] = None,
|
repr_style: Optional['Literal["short", "long"]'] = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self._rawentry: "Final" = rawentry
|
self._rawentry: Final = rawentry
|
||||||
self._repr_style: "Final" = repr_style
|
self._repr_style: Final = repr_style
|
||||||
|
|
||||||
def with_repr_style(
|
def with_repr_style(
|
||||||
self, repr_style: Optional['Literal["short", "long"]']
|
self, repr_style: Optional['Literal["short", "long"]']
|
||||||
|
|
|
@ -1913,7 +1913,7 @@ def parse_warning_filter(
|
||||||
parts.append("")
|
parts.append("")
|
||||||
action_, message, category_, module, lineno_ = (s.strip() for s in parts)
|
action_, message, category_, module, lineno_ = (s.strip() for s in parts)
|
||||||
try:
|
try:
|
||||||
action: "warnings._ActionKind" = warnings._getaction(action_) # type: ignore[attr-defined]
|
action: warnings._ActionKind = warnings._getaction(action_) # type: ignore[attr-defined]
|
||||||
except warnings._OptionError as e:
|
except warnings._OptionError as e:
|
||||||
raise UsageError(error_template.format(error=str(e))) from None
|
raise UsageError(error_template.format(error=str(e))) from None
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -298,7 +298,7 @@ class DoctestItem(Item):
|
||||||
def runtest(self) -> None:
|
def runtest(self) -> None:
|
||||||
_check_all_skipped(self.dtest)
|
_check_all_skipped(self.dtest)
|
||||||
self._disable_output_capturing_for_darwin()
|
self._disable_output_capturing_for_darwin()
|
||||||
failures: List["doctest.DocTestFailure"] = []
|
failures: List[doctest.DocTestFailure] = []
|
||||||
# Type ignored because we change the type of `out` from what
|
# Type ignored because we change the type of `out` from what
|
||||||
# doctest expects.
|
# doctest expects.
|
||||||
self.runner.run(self.dtest, out=failures) # type: ignore[arg-type]
|
self.runner.run(self.dtest, out=failures) # type: ignore[arg-type]
|
||||||
|
|
|
@ -34,8 +34,8 @@ class catch_threading_exception:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self.args: Optional["threading.ExceptHookArgs"] = None
|
self.args: Optional[threading.ExceptHookArgs] = None
|
||||||
self._old_hook: Optional[Callable[["threading.ExceptHookArgs"], Any]] = None
|
self._old_hook: Optional[Callable[[threading.ExceptHookArgs], Any]] = None
|
||||||
|
|
||||||
def _hook(self, args: "threading.ExceptHookArgs") -> None:
|
def _hook(self, args: "threading.ExceptHookArgs") -> None:
|
||||||
self.args = args
|
self.args = args
|
||||||
|
|
|
@ -34,8 +34,8 @@ class catch_unraisable_exception:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self.unraisable: Optional["sys.UnraisableHookArgs"] = None
|
self.unraisable: Optional[sys.UnraisableHookArgs] = None
|
||||||
self._old_hook: Optional[Callable[["sys.UnraisableHookArgs"], Any]] = None
|
self._old_hook: Optional[Callable[[sys.UnraisableHookArgs], Any]] = None
|
||||||
|
|
||||||
def _hook(self, unraisable: "sys.UnraisableHookArgs") -> None:
|
def _hook(self, unraisable: "sys.UnraisableHookArgs") -> None:
|
||||||
# Storing unraisable.object can resurrect an object which is being
|
# Storing unraisable.object can resurrect an object which is being
|
||||||
|
|
Loading…
Reference in New Issue