Skip vararg/varkw parameters from the config snippet.

This commit is contained in:
Fabio Manganiello 2023-09-30 13:53:33 +02:00
parent acb40bd5fd
commit ecffbf29bf
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -184,6 +184,11 @@ class DocstringParser:
ctx.state = ParseState.PARAM ctx.state = ParseState.PARAM
idx = len(ctx.parsed_params) idx = len(ctx.parsed_params)
ctx.cur_param = m.group("name") ctx.cur_param = m.group("name")
# Skip vararg/var keyword parameters
if ctx.cur_param == ctx.spec.varkw or ctx.spec.varargs:
return
ctx.parsed_params[ctx.cur_param] = Parameter( ctx.parsed_params[ctx.cur_param] = Parameter(
name=ctx.cur_param, name=ctx.cur_param,
required=( required=(