|
76 | 76 | ChoiceField(['test'], allow_null=True, default=None) |
77 | 77 | ChoiceField([1], default=int_callback) |
78 | 78 | 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] |
80 | 80 |
|
81 | 81 | - case: MultipleChoiceField_default |
82 | 82 | main: | |
|
90 | 90 | MultipleChoiceField(choices=['test'], allow_null=True, default=None) |
91 | 91 | MultipleChoiceField(choices=[1], default=int_set_callback) |
92 | 92 | 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] |
94 | 94 |
|
95 | 95 | MultipleChoiceField(choices=[(1, "1"), (2, "2")], default={1}) |
96 | 96 | 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