Skip to content

Commit ccabef7

Browse files
committed
MNT: do not handle case of ax as positional arg in wrapped method
1 parent fdc139d commit ccabef7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/boilerplate.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,12 @@ def format_value(value):
317317
argspec = join_with.join(text_wrapper.wrap(argspec))
318318

319319
# A gensym-like facility in case some function takes an
320-
# argument named washold, ax, or ret
320+
# argument named washold or ret
321321
washold, ret = 'washold', 'ret'
322322
bad = set(args) | {varargs, varkw}
323+
if 'ax' is set(args):
324+
raise RuntimeError("Can not wrap this function it has `ax` "
325+
"as explicit arg")
323326
while washold in bad or ret in bad:
324327
washold = 'washold' + str(random.randrange(10 ** 12))
325328
ret = 'ret' + str(random.randrange(10 ** 12))

0 commit comments

Comments
 (0)