Fix expected mypy output with bad converters now that typing information has been expanded

This commit is contained in:
Filipe Brandenburger 2024-11-18 12:56:07 -05:00
parent 1fd1259ad1
commit 0b649646b4
1 changed files with 4 additions and 4 deletions

View File

@ -788,9 +788,9 @@
reveal_type(A) reveal_type(A)
out: | out: |
main:15: error: Cannot determine __init__ type from converter [misc] main:15: error: Cannot determine __init__ type from converter [misc]
main:15: error: Argument "converter" has incompatible type "Callable[[], str]"; expected "Callable[[Any], Any] | Converter[Any, Never] | None" [arg-type] main:15: error: Argument "converter" has incompatible type "Callable[[], str]"; expected "Callable[[Any], Any] | Converter[Any, Any] | list[Callable[[Any], Any] | Converter[Any, Any]] | tuple[Callable[[Any], Any] | Converter[Any, Any]] | None" [arg-type]
main:16: error: Cannot determine __init__ type from converter [misc] main:16: error: Cannot determine __init__ type from converter [misc]
main:16: error: Argument "converter" has incompatible type overloaded function; expected "Callable[[Any], Any] | Converter[Any, Never] | None" [arg-type] main:16: error: Argument "converter" has incompatible type overloaded function; expected "Callable[[Any], Any] | Converter[Any, Any] | list[Callable[[Any], Any] | Converter[Any, Any]] | tuple[Callable[[Any], Any] | Converter[Any, Any]] | None" [arg-type]
main:17: note: Revealed type is "def (bad: Any, bad_overloaded: Any) -> main.A" main:17: note: Revealed type is "def (bad: Any, bad_overloaded: Any) -> main.A"
- case: testAttrsUsingBadConverterReprocess - case: testAttrsUsingBadConverterReprocess
@ -816,9 +816,9 @@
reveal_type(A) reveal_type(A)
out: | out: |
main:16: error: Cannot determine __init__ type from converter [misc] main:16: error: Cannot determine __init__ type from converter [misc]
main:16: error: Argument "converter" has incompatible type "Callable[[], str]"; expected "Callable[[Any], Any] | Converter[Any, Never] | None" [arg-type] main:16: error: Argument "converter" has incompatible type "Callable[[], str]"; expected "Callable[[Any], Any] | Converter[Any, Any] | list[Callable[[Any], Any] | Converter[Any, Any]] | tuple[Callable[[Any], Any] | Converter[Any, Any]] | None" [arg-type]
main:17: error: Cannot determine __init__ type from converter [misc] main:17: error: Cannot determine __init__ type from converter [misc]
main:17: error: Argument "converter" has incompatible type overloaded function; expected "Callable[[Any], Any] | Converter[Any, Never] | None" [arg-type] main:17: error: Argument "converter" has incompatible type overloaded function; expected "Callable[[Any], Any] | Converter[Any, Any] | list[Callable[[Any], Any] | Converter[Any, Any]] | tuple[Callable[[Any], Any] | Converter[Any, Any]] | None" [arg-type]
main:18: note: Revealed type is "def (bad: Any, bad_overloaded: Any) -> main.A" main:18: note: Revealed type is "def (bad: Any, bad_overloaded: Any) -> main.A"
- case: testAttrsUsingUnsupportedConverter - case: testAttrsUsingUnsupportedConverter