A function takes more parameters than the limit

tx0/python:too-many-parametersstrictwarningmaintainability

What it finds

A function takes more parameters than the limit

Example from the rule's tests
def connect(host, port, user, password, timeout, retries, verbose, proxy):tx0 reports: connect takes 8 parameters, more than the limit of 7    return host  class Client:    def open(self, host, port, user, password, timeout, retries, verbose):        return self     def send(self, a, b, c, d, e, f, g, *, h):tx0 reports: send takes 8 parameters        return self  def flexible(a, b, c, *args, **kwargs):    return args
Highlighted lines are the ones tx0 reports, with its message under each; the other lines are left alone.

Turn it on, off or suppress it

The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/python:too-many-parameters" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

# tx0: ignore[tx0/python:too-many-parameters] reason="..."

tx0 explain tx0/python:too-many-parameters shows the same in the terminal. Found a false positive? Report it.