Why is this an issue?

Functions, methods, or lambdas with a long parameter list are difficult to use, as maintainers must figure out the role of each parameter and keep track of their position.

def set_coordinates(x1, y1, z1, x2, y2, z2): # Noncompliant
    # ...

The solution can be to:

# Each function does a part of what the original set_coordinates function was doing, so confusion risks are lower
def set_origin(x, y, z):
   # ...

def set_size(width, height, depth):
   # ...
@dataclass
class Point: # In geometry, Point is a logical structure to group data
    x: int
    y: int
    z: int

def set_coordinates(p1: Point, p2: Point):
    # ...

This rule raises an issue when a function, a method, or a lambda has more parameters than the provided threshold.

Exceptions

The first argument of non-static methods, i.e., self or cls, is not counted as it is mandatory and passed automatically.