Skip to content

Commit 37043d8

Browse files
author
Shammamah Hossain
committed
Simplify logic for adding periods onto ends of descriptions.
Remove all periods from the end of description, if there are any, and add in another one.
1 parent 56d984d commit 37043d8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

dash/development/_py_components_generation.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,8 @@ def create_prop_docstring(prop_name, type_object, required, description,
444444
indent_spacing=indent_spacing,
445445
name=prop_name,
446446
type=py_type_name,
447-
description=description,
448-
period='. ' if description.strip()
449-
and description.strip()[-1] != '.' else '',
447+
description=description.strip().strip('.'),
448+
period='. ',
450449
is_required=is_required)
451450
return '{indent_spacing}- {name} ({type}' \
452451
'{is_required}){description}'.format(

0 commit comments

Comments
 (0)