durgaprasadml commented on code in PR #40481:
URL: https://github.com/apache/superset/pull/40481#discussion_r3335001871
##########
superset/views/base.py:
##########
@@ -449,7 +443,7 @@ def cached_common_bootstrap_data( # pylint:
disable=unused-argument
# should not expose API TOKEN to frontend
frontend_config = {
k: (
- list(app.config.get(k))
+ list(cast(Iterable[Any], app.config.get(k)))
Review Comment:
Good point — I refactored this to avoid the cast entirely.
I introduced a small helper that stores the config value in a local variable
and relies on isinstance(val, set) for proper runtime/type-checker narrowing
before converting to list(val).
This preserves the same runtime behavior while avoiding the explicit cast()
and keeping mypy/ruff/pylint checks passing.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]