Yash2412 commented on code in PR #33924:
URL: https://github.com/apache/superset/pull/33924#discussion_r2192005018
##########
superset/jinja_context.py:
##########
@@ -284,6 +285,56 @@ def url_param(
self.cache_key_wrapper(result)
return result
+ def get_guest_user_attribute(
+ self,
+ attribute_name: str,
+ default: str | None = None,
Review Comment:
You're absolutely right! The function is designed to support all JSON-native
types. I've updated the type annotations to use a `JsonValue` type alias that
covers:
```python
JsonValue = Union[
str, int, float, bool, list["JsonValue"], dict[str, "JsonValue"], None
]
```
This allows the function to handle strings, numbers, booleans, arrays,
objects, and null values - just like you'd expect from JSON. The examples in
the docstring and tests now demonstrate this full range of supported types.
--
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]