@@ -1889,12 +1889,12 @@ class C:
18891889c = C(name='foo', b=Derived())
18901890c = attr.evolve(c)
18911891c = attr.evolve(c, name='foo')
1892- c = attr.evolve(c, 'foo') # E: Too many positional arguments for "evolve"
1892+ c = attr.evolve(c, 'foo') # E: Too many positional arguments for "evolve" of "C"
18931893c = attr.evolve(c, b=Derived())
18941894c = attr.evolve(c, b=Base())
1895- c = attr.evolve(c, b=Other()) # E: Argument "b" to "evolve" has incompatible type "Other"; expected "Base"
1896- c = attr.evolve(c, name=42) # E: Argument "name" to "evolve" has incompatible type "int"; expected "str"
1897- c = attr.evolve(c, foobar=42) # E: Unexpected keyword argument "foobar" for "evolve"
1895+ c = attr.evolve(c, b=Other()) # E: Argument "b" to "evolve" of "C" has incompatible type "Other"; expected "Base"
1896+ c = attr.evolve(c, name=42) # E: Argument "name" to "evolve" of "C" has incompatible type "int"; expected "str"
1897+ c = attr.evolve(c, foobar=42) # E: Unexpected keyword argument "foobar" for "evolve" of "C"
18981898
18991899# test passing instance as 'inst' kw
19001900c = attr.evolve(inst=c, name='foo')
@@ -1907,7 +1907,7 @@ def f() -> C:
19071907c = attr.evolve(f(), name='foo')
19081908
19091909# test 'inst' arg type check
1910- attr.evolve(42, name='foo') # E: Argument 1 to "evolve" has incompatible type "Literal[42]? "; expected an attrs class
1910+ attr.evolve(42, name='foo') # E: Argument 1 to "evolve" has incompatible type "int "; expected an attrs class
19111911attr.evolve(None, name='foo') # E: Argument 1 to "evolve" has incompatible type "None"; expected an attrs class
19121912
19131913# test that all bets are off for 'Any'
@@ -1931,13 +1931,13 @@ class C:
19311931c = C(name='foo')
19321932
19331933c = attr.assoc(c, name='test')
1934- c = attr.assoc(c, name=42) # E: Argument "name" to "assoc" has incompatible type "int"; expected "str"
1934+ c = attr.assoc(c, name=42) # E: Argument "name" to "assoc" of "C" has incompatible type "int"; expected "str"
19351935
19361936c = attrs.evolve(c, name='test')
1937- c = attrs.evolve(c, name=42) # E: Argument "name" to "evolve" has incompatible type "int"; expected "str"
1937+ c = attrs.evolve(c, name=42) # E: Argument "name" to "evolve" of "C" has incompatible type "int"; expected "str"
19381938
19391939c = attrs.assoc(c, name='test')
1940- c = attrs.assoc(c, name=42) # E: Argument "name" to "assoc" has incompatible type "int"; expected "str"
1940+ c = attrs.assoc(c, name=42) # E: Argument "name" to "assoc" of "C" has incompatible type "int"; expected "str"
19411941
19421942[builtins fixtures/attr.pyi]
19431943[typing fixtures/typing-medium.pyi]
0 commit comments