flake8 extension to warn on unused function arguments
Project description
flake8-unused-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-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__new__
,__init__
,__getitem__
,__setitem__
,__reduce_ex__
,__enter__
,__exit__
, etc.
Changelog
0.0.11
- Added a new option for ignoring functions decorated with overload.
- Added a new option for ignoring dunder methods (double-underscore) methods.
0.0.10
- Added new options for ignoring lambdas and nested functions. Thanks to João Eiras for contributing these!
0.0.9
- Check nested functions.
- Don't crash if an attribute is used in a raise statement.
0.0.8
- Whoops, report the right version when using flake8 --help.
0.0.7
- The first unused argument in a @classmethod decorated function wasn't properly detected. Thanks to Sebastian Dietrich for contributing the fix!
0.0.6
- Stub functions that have docstrings are now correctly detected as stub functions
- Functions with only a docstring are considered stub functions
0.0.5
- The positions reported are now for the arguments themselves, rather than the function
0.0.4
- Wrong project name in the readme, whoopsies
0.0.3
- treat functions that start with "raise NotImplementedError()" as stub functions
0.0.2
- fixed error in packaging
0.0.1
- initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for flake8-unused-arguments-0.0.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 742918f5236557bfb22d1943459b8a7a4f17539e344945adb969e75a568dec87 |
|
MD5 | 560c212d28c14faff5056bd4fcfa05be |
|
BLAKE2b-256 | d31b503890bf3d252486d392f4cbb5218117a4d2ae35c366b94b82bdd31961e4 |
Close
Hashes for flake8_unused_arguments-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9518ac2e284c5aecead3215a5b359d431732ccbfc787a2e6e5a6f83417f77ee |
|
MD5 | 41876c9f2b89e2585cd66c72430a7e72 |
|
BLAKE2b-256 | f1fc949338b11edd99ee260347a4ee42b22f071992ef65d6397f5ea7224c9c6e |