Skip to content

Commit

Permalink
Fix mypy tests. Looks like the tests are error order sensitive (#856)
Browse files Browse the repository at this point in the history
  • Loading branch information
euresti authored and thetorpedodog committed Nov 1, 2021
1 parent dc25895 commit c5effaf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -785,10 +785,10 @@
bad_overloaded: int = attr.ib(converter=bad_overloaded_converter)
reveal_type(A)
out: |
main:15: error: Argument "converter" has incompatible type "Callable[[], str]"; expected "Callable[[Any], Any]"
main:15: error: Cannot determine __init__ type from converter
main:16: error: Argument "converter" has incompatible type overloaded function; expected "Callable[[Any], Any]"
main:15: error: Argument "converter" has incompatible type "Callable[[], str]"; expected "Callable[[Any], Any]"
main:16: error: Cannot determine __init__ type from converter
main:16: error: Argument "converter" has incompatible type overloaded function; expected "Callable[[Any], Any]"
main:17: note: Revealed type is "def (bad: Any, bad_overloaded: Any) -> main.A"
- case: testAttrsUsingBadConverterReprocess
Expand All @@ -814,10 +814,10 @@
bad_overloaded: int = attr.ib(converter=bad_overloaded_converter)
reveal_type(A)
out: |
main:16: error: Argument "converter" has incompatible type "Callable[[], str]"; expected "Callable[[Any], Any]"
main:16: error: Cannot determine __init__ type from converter
main:17: error: Argument "converter" has incompatible type overloaded function; expected "Callable[[Any], Any]"
main:16: error: Argument "converter" has incompatible type "Callable[[], str]"; expected "Callable[[Any], Any]"
main:17: error: Cannot determine __init__ type from converter
main:17: error: Argument "converter" has incompatible type overloaded function; expected "Callable[[Any], Any]"
main:18: note: Revealed type is "def (bad: Any, bad_overloaded: Any) -> main.A"
- case: testAttrsUsingUnsupportedConverter
Expand Down

0 comments on commit c5effaf

Please sign in to comment.