Skip to content

Commit b96112e

Browse files
committed
review comments
1 parent bcae308 commit b96112e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

plugins/ui/src/deephaven/ui/object_types/ElementType.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any
1+
from typing import Any, Literal
22

33
from deephaven.plugin.object_type import BidirectionalObjectType, MessageStream
44
from ..elements import Element
@@ -21,7 +21,7 @@ def name(self) -> str:
2121
return "deephaven.ui.Element"
2222

2323
@property
24-
def authorization_export_behavior(self) -> str:
24+
def authorization_export_behavior(self) -> Literal["transform", "unset"]:
2525
"""Declares that deephaven.ui must export its references through the authorization transform.
2626
2727
Server objects (tables, etc.) handed to the client via a deephaven.ui component are run through the
@@ -31,7 +31,9 @@ def authorization_export_behavior(self) -> str:
3131
enforced (fail secure).
3232
"""
3333
try:
34-
from deephaven.configuration import get_configuration
34+
# deephaven.configuration only exists in the 42.x server package; the import is conditional to
35+
# maintain compatibility with 41.x, where ImportError is caught and the transform is enforced.
36+
from deephaven.configuration import get_configuration # type: ignore[import-untyped,import-not-found]
3537

3638
if get_configuration().get_bool(
3739
_DISABLE_AUTHORIZATION_EXPORT_TRANSFORM_PROPERTY, False

0 commit comments

Comments
 (0)