flake8 extension to warn on unused function arguments
A flake8 plugin that checks for unused function arguments.
This package adds the following warnings:
U100- An unused argument.
U101- An unused argument starting with an underscore
Configuration options also exist:
unused-arguments-ignore-abstract-functions- don't show warnings for abstract functions.
unused-arguments-ignore-overload-functions- don't show warnings for overload functions.
unused-arguments-ignore-override-functions- don't show warnings for overridden functions.
unused-arguments-ignore-stub-functions- don't show warnings for empty functions.
unused-arguments-ignore-variadic-names- don't show warnings for unused *args and **kwargs.
unused-arguments-ignore-lambdas- don't show warnings for all lambdas.
unused-arguments-ignore-nested-functions- don't show warnings for nested functions. Only show warnings for functions in the top level of a module, or methods of a class in the top level of a module.
unused-arguments-ignore-dunder- don't show warnings for double-underscore methods. These methods implement or override native builtin methods which have a specific signature. Therefore arguments must always be present. This is the case of methods like
- Added a new option for ignoring functions decorated with the override decorator. Thanks to Thomas M Kehrenberg for contributing this!
- Fixed an issue causing flake8 --help to break. Thanks to Calum Young for contributing this fix!
- Starting from this release, automated CI runs on each Github PR. Thanks again to Calum Young for contributing this work!
- Added a new option for ignoring functions decorated with overload.
- Added a new option for ignoring dunder methods (double-underscore) methods.
- Added new options for ignoring lambdas and nested functions. Thanks to João Eiras for contributing these!
- Check nested functions.
- Don't crash if an attribute is used in a raise statement.
- Whoops, report the right version when using flake8 --help.
- The first unused argument in a @classmethod decorated function wasn't properly detected. Thanks to Sebastian Dietrich for contributing the fix!
- Stub functions that have docstrings are now correctly detected as stub functions
- Functions with only a docstring are considered stub functions
- The positions reported are now for the arguments themselves, rather than the function
- Wrong project name in the readme, whoopsies
- treat functions that start with "raise NotImplementedError()" as stub functions
- fixed error in packaging
- initial release
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for flake8-unused-arguments-0.0.13.tar.gz
Hashes for flake8_unused_arguments-0.0.13-py3-none-any.whl