File tree Expand file tree Collapse file tree 1 file changed +4
-24
lines changed Expand file tree Collapse file tree 1 file changed +4
-24
lines changed Original file line number Diff line number Diff line change @@ -2497,7 +2497,7 @@ c = Child(run_type = None)
24972497reveal_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
25022502from typing import overload
25032503
@@ -2520,27 +2520,7 @@ class C:
25202520obj = C(1)
25212521attrs.evolve(obj, x=2)
25222522attrs.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]
You can’t perform that action at this time.
0 commit comments