File tree 1 file changed +9
-10
lines changed
1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -396,18 +396,17 @@ def __init__(self, func):
396
396
else :
397
397
#finding argcount for other builtins is a mess
398
398
nargs = 2
399
- raise warnings .warn (f"""{ func .__name__ } is not supported
400
- and may not work as expected""" )
401
- if nargs == 2 :
399
+ raise warnings .warn (f"{ func .__name__ } is not supported "
400
+ "and may not work as expected" )
401
+
402
+ if nargs == 1 :
403
+ self .func = lambda x , pos : func (x )
404
+ elif nargs == 2 :
402
405
self .func = func
403
- elif nargs == 1 :
404
- def func_pos (x , pos ):
405
- return func (x )
406
- self .func = func_pos
407
406
else :
408
- raise TypeError (f""" Number of parameters in function: { nargs } .
409
- FuncFormatter functions take at most 2:
410
- x (required), pos (optional)."" " )
407
+ raise TypeError (f"Number of parameters in function: { nargs } . "
408
+ " FuncFormatter functions take at most 2: "
409
+ " x (required), pos (optional)." )
411
410
412
411
def __call__ (self , x , pos = None ):
413
412
"""
You can’t perform that action at this time.
0 commit comments