Skip to content

Commit c4716de

Browse files
committed
fix test case
1 parent 93db908 commit c4716de

File tree

1 file changed

+4
-24
lines changed

1 file changed

+4
-24
lines changed

test-data/unit/check-plugin-attrs.test

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2497,7 +2497,7 @@ c = Child(run_type = None)
24972497
reveal_type(c.run_type) # N: Revealed type is "Union[builtins.int, None]"
24982498
[builtins fixtures/plugin_attrs.pyi]
24992499

2500-
[case testAttrsInitOverload1]
2500+
[case testAttrsInitOverload]
25012501
# flags: --python-version 3.10
25022502
from typing import overload
25032503

@@ -2520,27 +2520,7 @@ class C:
25202520
obj = C(1)
25212521
attrs.evolve(obj, x=2)
25222522
attrs.evolve(obj, x="2")
2523-
[builtins fixtures/plugin_attrs.pyi]
2524-
2525-
[case testAttrsInitOverload2]
2526-
# flags: --python-version 3.10
2527-
from typing import overload
2528-
2529-
import attrs
2530-
2531-
@attrs.frozen(init=False)
2532-
class C:
2533-
x: int | str
2534-
2535-
@overload
2536-
def __init__(self, x: int) -> None: ...
2537-
2538-
@overload
2539-
def __init__(self, x: str) -> None: ...
2540-
2541-
def __init__(self, x: int | str) -> None:
2542-
self.__attrs_init__(x)
2543-
2544-
obj = C(1)
2545-
attrs.evolve(obj, x=2)
2523+
attrs.evolve(obj, x=[])
2524+
attrs.evolve(obj, x={})
2525+
attrs.evolve(obj, x="1", y=2)
25462526
[builtins fixtures/plugin_attrs.pyi]

0 commit comments

Comments
 (0)