nhoad / flake8-unused-arguments

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

Update is_dunder_method to pass type checking #19

Closed calumy closed 2 years ago

calumy commented 2 years ago

Type checking fails with the response:

flake8_unused_arguments.py:265: error: Incompatible return value type (got "Union[str, bool]", expected "bool")  [return-value]

This PR fixes this type issue by checking the name is a function attribute before checking it starts and ends with "__".

nhoad commented 2 years ago

This is great! Thank you again Calum. The workflow for testing is awesome too.

I'm not going to do a new release for either PR, as there's no actual change to the plugin itself.