Skip to content

Commit b132e7f

Browse files
authored
[wtforms] fix SelectField.choices
`list` is invariant, so .choices can't be assigned to after initialisation. Doing so is suggested in the documentation: https://wtforms.readthedocs.io/en/3.2.x/fields/#wtforms.fields.SelectField
1 parent a9fbf47 commit b132e7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stubs/WTForms/wtforms/fields/choices.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class SelectFieldBase(Field):
4646

4747
class SelectField(SelectFieldBase):
4848
coerce: Callable[[Any], Any]
49-
choices: list[_Choice] | _GroupedChoices
49+
choices: Sequence[_Choice] | _GroupedChoices
5050
validate_choice: bool
5151
def __init__(
5252
self,

0 commit comments

Comments
 (0)