@@ -1889,12 +1889,12 @@ class C:
1889
1889
c = C(name='foo', b=Derived())
1890
1890
c = attr.evolve(c)
1891
1891
c = 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"
1893
1893
c = attr.evolve(c, b=Derived())
1894
1894
c = 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"
1898
1898
1899
1899
# test passing instance as 'inst' kw
1900
1900
c = attr.evolve(inst=c, name='foo')
@@ -1907,7 +1907,7 @@ def f() -> C:
1907
1907
c = attr.evolve(f(), name='foo')
1908
1908
1909
1909
# 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
1911
1911
attr.evolve(None, name='foo') # E: Argument 1 to "evolve" has incompatible type "None"; expected an attrs class
1912
1912
1913
1913
# test that all bets are off for 'Any'
@@ -1931,13 +1931,13 @@ class C:
1931
1931
c = C(name='foo')
1932
1932
1933
1933
c = 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"
1935
1935
1936
1936
c = 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"
1938
1938
1939
1939
c = 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"
1941
1941
1942
1942
[builtins fixtures/attr.pyi]
1943
1943
[typing fixtures/typing-medium.pyi]
0 commit comments