villebro commented on a change in pull request #14756:
URL: https://github.com/apache/superset/pull/14756#discussion_r639832208
##########
File path: superset/jinja_context.py
##########
@@ -297,7 +297,7 @@ def get_filters(self, column: str, remove_filter: bool =
False) -> List[Filter]:
filters: List[Filter] = []
for flt in form_data.get("adhoc_filters", []):
- val: Union[str, List[str]] = flt.get("comparator")
+ val: Union[Any, List[Any]] = flt.get("comparator")
Review comment:
If we want to be fully explicit, I believe the full type would be
`Union[bool, str, int, float, List[bool], List[str], List[int], List[float]]`,
but that feels slightly verbose. Could potentially be shortened by introducing
an alias `FilterValue = bool, str, int, float` and then doing
`Union[FilterValue, List[FilterValue]]`, but even that feels kinda stuffy.
However, I'd personally vote for keeping it `Any` for now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]