unexpected-keyword-arg / E1123#

Message emitted:

Unexpected keyword argument %r in %s call

Description:

Used when a function call passes a keyword argument that doesn't correspond to one of the function's parameter names.

Correct code:

def print_coordinates(x=0, y=0):
    print(f"{x=}, {y=}")


print_coordinates(x=1, y=2)

Problematic code:

def print_coordinates(x=0, y=0):
    print(f"{x=}, {y=}")


print_coordinates(x=1, y=2, z=3)  # [unexpected-keyword-arg]

Created by the typecheck checker.