Convert Positional-Only Arguments to Arguments

This transform converts positional-only arguments into normal arguments by removing the ‘/’ separator in the argument list.

This transform is almost always safe to use and enabled by default.

Disable this source transformation by passing the convert_posargs_to_args=False argument to the python_minifier.minify() function, or passing --no-convert-posargs-to-args to the pyminify command.

Example

Input

def name(p1, p2, /, p_or_kw, *, kw): pass
def name(p1, p2=None, /, p_or_kw=None, *, kw): pass
def name(p1, p2=None, /, *, kw): pass
def name(p1, p2=None, /): pass
def name(p1, p2, /, p_or_kw): pass
def name(p1, p2, /): pass

Output

def name(p1,p2,p_or_kw,*,kw):pass
def name(p1,p2=None,p_or_kw=None,*,kw):pass
def name(p1,p2=None,*,kw):pass
def name(p1,p2=None):pass
def name(p1,p2,p_or_kw):pass
def name(p1,p2):pass