Clean docstrings when generating actions docs

This commit is contained in:
Kovid Goyal 2021-06-30 15:06:12 +05:30
parent a8f7b1eb92
commit cf41d56c00
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -40,7 +40,7 @@ def get_all_actions() -> Dict[str, List[Action]]:
return bool(doc and doc.strip().startswith('@ac:'))
def as_action(x: object) -> Action:
doc = (x.__doc__ or '').strip()
doc = inspect.cleandoc(x.__doc__ or '')
lines = doc.splitlines()
first = lines.pop(0)
parts = first.split(':', 2)