Clean docstrings when generating actions docs
This commit is contained in:
parent
a8f7b1eb92
commit
cf41d56c00
@ -40,7 +40,7 @@ def get_all_actions() -> Dict[str, List[Action]]:
|
|||||||
return bool(doc and doc.strip().startswith('@ac:'))
|
return bool(doc and doc.strip().startswith('@ac:'))
|
||||||
|
|
||||||
def as_action(x: object) -> Action:
|
def as_action(x: object) -> Action:
|
||||||
doc = (x.__doc__ or '').strip()
|
doc = inspect.cleandoc(x.__doc__ or '')
|
||||||
lines = doc.splitlines()
|
lines = doc.splitlines()
|
||||||
first = lines.pop(0)
|
first = lines.pop(0)
|
||||||
parts = first.split(':', 2)
|
parts = first.split(':', 2)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user