Fixed _default_docstring regex.

This commit is contained in:
Fabio Manganiello 2023-09-30 14:35:31 +02:00
parent 532f5479b3
commit 1732bfa82c
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
2 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@ steps:
commands:
- echo "Installing required build dependencies"
- apk add --update --no-cache make py3-sphinx py3-pip $(cat platypush/install/requirements/alpine.txt)
- apk add --update --no-cache make py3-sphinx py3-pip py3-paho-mqtt $(cat platypush/install/requirements/alpine.txt)
- pip install -U hid sphinx-rtd-theme sphinx-book-theme
- pip install .
- mkdir -p /docs/current

View File

@ -99,7 +99,7 @@ class DocstringParser:
_param_doc_re = re.compile(r"^:param\s+(?P<name>[\w_]+):\s+(?P<doc>.*)$")
_type_doc_re = re.compile(r"^:type\s+[\w_]+:.*$")
_return_doc_re = re.compile(r"^:return:\s+(?P<doc>.*)$")
_default_docstring = re.compile(r"^Initialize self. See help")
_default_docstring = re.compile(r"^\s*Initialize self\. See help.*$")
def __init__(
self,
@ -186,7 +186,7 @@ class DocstringParser:
ctx.cur_param = m.group("name")
# Skip vararg/var keyword parameters
if ctx.cur_param == ctx.spec.varkw or ctx.spec.varargs:
if ctx.cur_param in {ctx.spec.varkw, ctx.spec.varargs}:
return
ctx.parsed_params[ctx.cur_param] = Parameter(