UserWarning: Pydantic serializer warnings: Expected `Union[bool, int, str, dict[str, str]]` but got `list` - serialized value may not be as expected #117
should do the job. I did not go through all options of https://getdatepicker.com/4/Options/. There might be more of these typing issues. A less restrictive schema might be more appropriate here:
WidgetOptions: TypeAlias = Dict[str, typing.Any]
Expected behavior
There should be no warning.
Setup Information (please complete the following information):
To Reproduce Using options https://getdatepicker.com/4/Options/#daysofweekdisabled for example:
will show:
This warning does not have any consequences. The picker is rendered correctly.
As far as I can judge, this is due to schemas.py:9
where
Union
does not include list. Thus a fix:should do the job. I did not go through all options of https://getdatepicker.com/4/Options/. There might be more of these typing issues. A less restrictive schema might be more appropriate here:
Expected behavior
There should be no warning.
Setup Information (please complete the following information):