Skip to content

Commit

Permalink
Fix return type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinche committed Dec 25, 2024
1 parent 7f2cedc commit 89edc26
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/typed.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
)

from attr._make import _CountingAttr
from attrs import NOTHING, Factory, field, frozen
from attrs import NOTHING, AttrsInstance, Factory, field, frozen
from hypothesis import note
from hypothesis.strategies import (
DrawFn,
Expand Down Expand Up @@ -400,8 +400,8 @@ def path_typed_attrs(

@composite
def dict_typed_attrs(
draw, defaults=None, allow_mutable_defaults=True, kw_only=None
) -> SearchStrategy[tuple[_CountingAttr, SearchStrategy]]:
draw: DrawFn, defaults=None, allow_mutable_defaults=True, kw_only=None
) -> tuple[_CountingAttr, SearchStrategy[dict[str, int]]]:
"""
Generate a tuple of an attribute and a strategy that yields dictionaries
for that attribute. The dictionaries map strings to integers.
Expand Down Expand Up @@ -819,7 +819,7 @@ def nested_classes(
tuple[type, SearchStrategy[PosArgs], SearchStrategy[KwArgs]],
]
],
) -> SearchStrategy[tuple[Type, SearchStrategy[PosArgs], SearchStrategy[KwArgs]]]:
) -> tuple[type[AttrsInstance], SearchStrategy[PosArgs], SearchStrategy[KwArgs]]:
attrs, class_and_strat = draw(attrs_and_classes)
cls, strat, kw_strat = class_and_strat
pos_defs = tuple(draw(strat))
Expand Down

0 comments on commit 89edc26

Please sign in to comment.