positional-only-arguments-expected / E3102#

Message emitted:

`%s()` got some positional-only arguments passed as keyword arguments: %s

Description:

Emitted when positional-only arguments have been passed as keyword arguments. Remove the keywords for the affected arguments in the function call.

Problematic code:

def cube(n, /):
    """Takes in a number n, returns the cube of n"""
    return n**3


cube(n=2)  # [positional-only-arguments-expected]

Correct code:

def cube(n, /):
    """Takes in a number n, returns the cube of n"""
    return n**3


cube(2)

Related links:

Created by the method_args checker.