Skip to main content

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-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.

Changelog

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flake8-unused-arguments-0.0.10.tar.gz (4.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

flake8_unused_arguments-0.0.10-py3.10.egg (7.9 kB view details)

Uploaded Egg

flake8_unused_arguments-0.0.10-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file flake8-unused-arguments-0.0.10.tar.gz.

File metadata

File hashes

Hashes for flake8-unused-arguments-0.0.10.tar.gz
Algorithm Hash digest
SHA256 8a7003186e0613ca5295290f2cda5013acdfbcf775f28067ed633b2cb8229bcf
MD5 7f0f9df005750f5181f5b5f286d31a32
BLAKE2b-256 08f0d10c3fb2a3659efa16f2fc8eab5813a1c1a67a3e3862ecced4909bdede96

See more details on using hashes here.

File details

Details for the file flake8_unused_arguments-0.0.10-py3.10.egg.

File metadata

File hashes

Hashes for flake8_unused_arguments-0.0.10-py3.10.egg
Algorithm Hash digest
SHA256 3dab2a981e6224c0910e2431d85f5f97950a27126cc02a4e0ad4fcc687731c0f
MD5 0405f36ee024c1550b7f9458cf6afe30
BLAKE2b-256 e21da6792afe56039692f7ecac126b5739b590dc9b9f91402afac65a6b9fd76b

See more details on using hashes here.

File details

Details for the file flake8_unused_arguments-0.0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for flake8_unused_arguments-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 4003e202fa785b58aff795f9064910f9218de8e2a9cded741199adfd41099d49
MD5 7651f86015823084fbafcfa050c342a7
BLAKE2b-256 9b1fb7bf58cdd818e945a63fd55debf19540c6c9330130e914a51a0a29e77ada

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page