You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[WTForms] render_kw, get_translations() and some messages can be None #16828
In WTForms 3.3.2 these are None by default, but the stubs don't allow it:
Field.render_kw
DefaultMeta.get_translations() returns None when locales is False (the default)
validators.DateRange.message
SelectField.invalid_choice_message
So form.name.render_kw["class"] = "x" or form.meta.get_translations(form).gettext(...) pass mypy and raise at runtime. DefaultMeta.translations_cache is keyed by a tuple of locales or None, not str. DateTimeLocalField.tz is also missing as an attribute.
Activity