Skip to content

Commit c70659e

Browse files
author
Shammamah Hossain
committed
Check whether default values equal null/empty types instead of whether they contain them.
1 parent 7c6d72b commit c70659e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dash/development/_py_components_generation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def create_prop_docstring(prop_name, type_object, required, description,
433433
is_required = 'optional'
434434
if required:
435435
is_required = 'required'
436-
elif default and 'null' not in str(default) and '[]' not in str(default):
436+
elif default and default not in ['null', '{}', '[]']:
437437
is_required = 'default {}'.format(
438438
default.replace('\n', '\n' + indent_spacing)
439439
)

0 commit comments

Comments
 (0)