Improved docstring parser logic.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Fabio Manganiello 2023-09-30 12:35:31 +02:00
parent e6f05dfe07
commit 15d06fa5c2
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
2 changed files with 2 additions and 5 deletions

View File

@ -130,7 +130,7 @@ class RunnablePlugin(Plugin):
):
"""
:param poll_interval: How often the :meth:`.loop` function should be
execute (default: 15 seconds). *NOTE*: For back-compatibility
executed (default: 15 seconds). *NOTE*: For back-compatibility
reasons, the `poll_seconds` argument is also supported, but it's
deprecated.
:param stop_timeout: How long we should wait for any running

View File

@ -133,7 +133,7 @@ class DocstringParser:
return None
lines = text.split("\n")
return (lines[0] + tw.dedent("\n".join(lines[1:]) or "")).strip()
return (lines[0] + " " + tw.dedent("\n".join(lines[1:]) or "")).strip()
ctx = ParseContext(obj)
yield ctx
@ -179,9 +179,6 @@ class DocstringParser:
ctx.state = ParseState.PARAM
idx = len(ctx.parsed_params)
ctx.cur_param = m.group("name")
if ctx.cur_param not in ctx.param_names:
return
ctx.parsed_params[ctx.cur_param] = Parameter(
name=ctx.cur_param,
required=(