Derived from the Pylint linter.
This rule is unstable and in preview. The
--preview flag is required for use.
What it does#
Checks for function definitions that include too many positional arguments.
By default, this rule allows up to five arguments, as configured by the
Why is this bad?#
Functions with many arguments are harder to understand, maintain, and call. This is especially true for functions with many positional arguments, as providing arguments positionally is more error-prone and less clear to readers than providing arguments by name.
Consider refactoring functions with many arguments into smaller functions with fewer arguments, using objects to group related arguments, or migrating to keyword-only arguments.