A Flake8 plugin for checking arguments in a function
The ideal number of arguments for a function is zero (niladic). Next comes one (monadic), followed closely by two (dyadic). Three arguments (triadic) should be avoided where possible. More than three (polyadic) requires very special justification—and then shouldn’t be used anyway.
-- Robert C. Martin "Clean Code"
Install from pip with:
$ pip install -i https://test.pypi.org/simple/ flake8-args-kwargs
flake8-args-kwargs uses pytest for tests. To run them use:
$ make test
Rule | Description |
---|---|
AK001 | The function has more than 2 arguments |
AK002 | The function contains a boolean variable |