Skip to content

Commit 77754e1

Browse files
author
Shammamah Hossain
committed
Add more logic to adding period to the end of descriptions in docstrings.
Fix pylint errors.
1 parent 60809ab commit 77754e1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dash/development/_py_components_generation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,13 +438,14 @@ def create_prop_docstring(prop_name, type_object, required, description,
438438

439439
if '\n' in py_type_name:
440440
return '{indent_spacing}- {name} (dict; {is_required}): ' \
441-
'{description}{period} ' \
441+
'{description}{period}' \
442442
'{name} has the following type: {type}'.format(
443443
indent_spacing=indent_spacing,
444444
name=prop_name,
445445
type=py_type_name,
446446
description=description,
447-
period='.' if description and description[-1] != '.' else '',
447+
period='. ' if description.strip()
448+
and description.strip()[-1] != '.' else '',
448449
is_required=is_required)
449450
return '{indent_spacing}- {name} ({type}' \
450451
'{is_required}){description}'.format(

0 commit comments

Comments
 (0)