Is your feature request related to a problem? Please describe.
While the style guide prefers duck typing over inheritance, many developers prefer inheritance for the sake of communicating structure to other developers. If a method both has arguments and raises a NotImplementedError – a common pattern for defining method signatures – the Lint/UnusedMethodArgument warning is triggered.
Describe the solution you'd like
I would like functions with arguments that only contain raise NotImplementedError to be ignored by Lint/UnusedMethodArgument. Ideally, there would be a setting (maybe IgnoreNotImplementedMethods) that is true by default.
This should not trigger any warnings
Describe alternatives you've considered
Currently you can use the following work arounds
Leave a method empty, because IgnoreEmptyMethods is true by default
This is insufficient, because in many cases calling a method should immediately fail if it hasn't been implemented by a child class. Otherwise, bugs can appear far deeper in the execution path.
Prefix the variables with an underscore
This is insufficient, as it communicates that the prefixed argument(s) are optional. They may not be.
Don't include arguments in the signature
This is insufficient, as it fails to communicate the arguments child classes should expect for a method.
The text was updated successfully, but these errors were encountered:
changed the title
Allow unused variables when funciton only raises a NotImplementedErrorFeb 21, 2020