Skip to content

Commit 3e4b2a6

Browse files
committed
Oops, more test fixes
1 parent 9b6a36c commit 3e4b2a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/typecheck/test_fields.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
ChoiceField(['test'], allow_null=True, default=None)
7777
ChoiceField([1], default=int_callback)
7878
ChoiceField([1, 'lulz'], default=mixed_callback)
79-
ChoiceField([1], default=lambda: None) # E: Argument "default" to "ChoiceField" has incompatible type "Callable[[], None]"; expected "Union[Union[str, _StrPromise], int, Callable[[], Union[Union[str, _StrPromise], int]], None, _Empty]" # E: Incompatible return value type (got "None", expected "Union[Union[str, _StrPromise], int]") [arg-type]
79+
ChoiceField([1], default=lambda: None) # E: Argument "default" to "ChoiceField" has incompatible type "Callable[[], None]"; expected "Union[Union[str, _StrPromise], int, Callable[[], Union[Union[str, _StrPromise], int]], None, _Empty]" [arg-type] # E: Incompatible return value type (got "None", expected "Union[Union[str, _StrPromise], int]") [return-value]
8080
8181
- case: MultipleChoiceField_default
8282
main: |
@@ -90,7 +90,7 @@
9090
MultipleChoiceField(choices=['test'], allow_null=True, default=None)
9191
MultipleChoiceField(choices=[1], default=int_set_callback)
9292
MultipleChoiceField(choices=[1, 'lulz'], default=mixed_set_callback)
93-
MultipleChoiceField(choices=[1], default=lambda: [1]) # E: Argument "default" to "MultipleChoiceField" has incompatible type "Callable[[], List[int]]"; expected "Union[Set[Union[str, int]], Set[str], Set[int], Callable[[], Union[Set[Union[str, int]], Set[str], Set[int]]], None, _Empty]" # E: Incompatible return value type (got "List[int]", expected "Union[Set[Union[str, int]], Set[str], Set[int]]") [arg-type]
93+
MultipleChoiceField(choices=[1], default=lambda: [1]) # E: Argument "default" to "MultipleChoiceField" has incompatible type "Callable[[], List[int]]"; expected "Union[Set[Union[str, int]], Set[str], Set[int], Callable[[], Union[Set[Union[str, int]], Set[str], Set[int]]], None, _Empty]" [arg-type] # E: Incompatible return value type (got "List[int]", expected "Union[Set[Union[str, int]], Set[str], Set[int]]") [return-value]
9494
9595
MultipleChoiceField(choices=[(1, "1"), (2, "2")], default={1})
9696
MultipleChoiceField(choices=[(1, "1"), (2, "2")], default=[1]) # E: Argument "default" to "MultipleChoiceField" has incompatible type "List[int]"; expected "Union[Set[Union[str, int]], Set[str], Set[int], Callable[[], Union[Set[Union[str, int]], Set[str], Set[int]]], None, _Empty]" [arg-type]

0 commit comments

Comments
 (0)