nhoad / flake8-unused-arguments

Flake8 plugin to warn against unused arguments in functions
MIT License
31 stars 8 forks source link

Feature request: ignore underscore arguments #13

Closed Fogapod closed 2 years ago

Fogapod commented 2 years ago
def a(_test):
    pass

This produces warning: a.py:1:7: U101 Unused argument '_test'

This is pretty much a common practice to not raise warnings if argument name starts with underscore

nhoad commented 2 years ago

Per the documentation, U101 is produced when an argument starts with an underscore. If you don't want errors for those, ignore U101.