Skip to content

Commit d810826

Browse files
[pre-commit.ci] pre-commit autoupdate (#423)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent d2955c6 commit d810826

File tree

8 files changed

+13
-15
lines changed

8 files changed

+13
-15
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
- id: ruff
1111
args: [--fix, --exit-non-zero-on-fix]
1212
- repo: https://github.com/psf/black
13-
rev: 23.12.1
13+
rev: 24.1.1
1414
hooks:
1515
- id: black
1616
- repo: https://github.com/tox-dev/tox-ini-fmt

src/sphinx_autodoc_typehints/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Sphinx autodoc type hints."""
2+
23
from __future__ import annotations
34

45
import ast

src/sphinx_autodoc_typehints/attributes_patch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Patch for attributes."""
2+
23
from __future__ import annotations
34

45
from functools import partial

src/sphinx_autodoc_typehints/patches.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Custom patches to make the world work."""
2+
23
from __future__ import annotations
34

45
from functools import lru_cache

tests/roots/test-resolve-typing-guard-tmp/demo_typing_guard.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module demonstrating imports that are type guarded"""
2+
23
from __future__ import annotations
34

45
import datetime

tests/roots/test-resolve-typing-guard/demo_typing_guard.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module demonstrating imports that are type guarded"""
2+
23
from __future__ import annotations
34

45
import typing
@@ -54,8 +55,7 @@ def guarded(self, item: Decimal) -> None:
5455
"""
5556

5657

57-
def func(_x: Literal) -> None:
58-
...
58+
def func(_x: Literal) -> None: ...
5959

6060

6161
__all__ = [

tests/test_integration.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -625,13 +625,11 @@ def func_with_examples() -> int:
625625

626626

627627
@overload
628-
def func_with_overload(a: int, b: int) -> None:
629-
...
628+
def func_with_overload(a: int, b: int) -> None: ...
630629

631630

632631
@overload
633-
def func_with_overload(a: str, b: str) -> None:
634-
...
632+
def func_with_overload(a: str, b: str) -> None: ...
635633

636634

637635
@expected(

tests/test_sphinx_autodoc_typehints.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,17 @@ class A:
8080
def get_type(self) -> type:
8181
return type(self)
8282

83-
class Inner:
84-
...
83+
class Inner: ...
8584

8685

8786
class B(Generic[T]):
8887
name = "Foo" # This is set to make sure the correct class name ("B") is picked up
8988

9089

91-
class C(B[str]):
92-
...
90+
class C(B[str]): ...
9391

9492

95-
class D(typing_extensions.Protocol):
96-
...
93+
class D(typing_extensions.Protocol): ...
9794

9895

9996
class E(typing_extensions.Protocol[T]): # type: ignore[misc]
@@ -104,8 +101,7 @@ class Slotted:
104101
__slots__ = ()
105102

106103

107-
class Metaclass(type):
108-
...
104+
class Metaclass(type): ...
109105

110106

111107
class HintedMethods:

0 commit comments

Comments
 (0)