Skip to content

Commit ad415cb

Browse files
committed
Added error test case for overloaded custom __init__
1 parent bd929fb commit ad415cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2518,8 +2518,8 @@ class C:
25182518

25192519

25202520
obj = C(1)
2521-
attrs.evolve(obj, x=2) # E: Argument 1 to "evolve" has incompatible type "C"; expected an attrs class
2522-
attrs.evolve(obj, x="2") # E: Argument 1 to "evolve" has incompatible type "C"; expected an attrs class
2521+
attrs.evolve(obj, x=2)
2522+
attrs.evolve(obj, x="2")
25232523
[builtins fixtures/plugin_attrs.pyi]
25242524

25252525
[case testAttrsInitOverload2]
@@ -2542,5 +2542,5 @@ class C:
25422542
self.__attrs_init__(x)
25432543

25442544
obj = C(1)
2545-
attrs.evolve(obj, x=2) # E: Argument 1 to "evolve" has incompatible type "C"; expected an attrs class
2545+
attrs.evolve(obj, x=2)
25462546
[builtins fixtures/plugin_attrs.pyi]

0 commit comments

Comments
 (0)