File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1096,7 +1096,7 @@ def fields_function_sig_callback(ctx: mypy.plugin.FunctionSigContext) -> Callabl
10961096 )
10971097
10981098 ctx .api .fail (
1099- f'Argument 1 to "fields" has incompatible type "{ format_type_bare (proper_type )} "; expected an attrs class' ,
1099+ f'Argument 1 to "fields" has incompatible type "{ format_type_bare (proper_type , ctx . api . options )} "; expected an attrs class' ,
11001100 ctx .context ,
11011101 )
11021102 return ctx .default_signature
Original file line number Diff line number Diff line change @@ -1562,7 +1562,7 @@ reveal_type(f(A)[0]) # N: Revealed type is "attr.Attribute[builtins.int]"
15621562reveal_type(f(A).b) # N: Revealed type is "attr.Attribute[builtins.int]"
15631563f(A).x # E: "____main___A_AttrsAttributes__" has no attribute "x"
15641564
1565- [builtins fixtures/attr .pyi]
1565+ [builtins fixtures/plugin_attrs .pyi]
15661566
15671567[case testAttrsGenericFields]
15681568from typing import TypeVar
@@ -1584,7 +1584,7 @@ def f(t: TA) -> None:
15841584 fields(t).x # E: "____main___A_AttrsAttributes__" has no attribute "x"
15851585
15861586
1587- [builtins fixtures/attr .pyi]
1587+ [builtins fixtures/plugin_attrs .pyi]
15881588
15891589[case testNonattrsFields]
15901590from typing import Any, cast
@@ -1598,7 +1598,7 @@ fields(A) # E: Argument 1 to "fields" has incompatible type "Type[A]"; expected
15981598fields(None) # E: Argument 1 to "fields" has incompatible type "None"; expected an attrs class
15991599fields(cast(Any, 42))
16001600
1601- [builtins fixtures/attr .pyi]
1601+ [builtins fixtures/plugin_attrs .pyi]
16021602
16031603[case testAttrsInitMethodAlwaysGenerates]
16041604from typing import Tuple
You can’t perform that action at this time.
0 commit comments