Closed rickeylev closed 1 month ago
It appears that the position of *args in a signature is lost after parsing. Given this:
*args
def f(a, *args, b=1): pass
The proto output shows args in the last position, but it should be the second:
args
parameter { name: "a" default_value: "1" } parameter { name: "b" default_value: "1" } parameter { name: "args" }
The two signatures described are slightly different: the real function describes something that takes a variable number of positional args, and b must be a keyword arg. The proto output describes something that allows b to be a positional arg.
b
Unfortunately, we'd need to fix this in Bazel in the proto extractor...
I am folding this issue into #225 because they are the same problem with the same solution.
It appears that the position of
*args
in a signature is lost after parsing. Given this:The proto output shows
args
in the last position, but it should be the second:The two signatures described are slightly different: the real function describes something that takes a variable number of positional args, and
b
must be a keyword arg. The proto output describes something that allowsb
to be a positional arg.