Skip to content

Commit dade5c4

Browse files
committed
Fix id typing
1 parent 4ddda2f commit dade5c4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dash/development/_py_prop_typing.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ def generate_enum(type_info, *_):
120120
def get_prop_typing(
121121
type_name: str, component_name: str, prop_name: str, type_info, namespace=None
122122
):
123+
if prop_name == "id":
124+
# Id is always the same either a string or a dict for pattern matching.
125+
return "typing.Union[str, dict]"
126+
123127
if namespace:
124128
# Only check the namespace once
125129
special = (

0 commit comments

Comments
 (0)