Open
Description
As pointed out in #215 and #217, overridden method names are out of the dev's control when subclassing an external library.
But that actually extends to the whole method signature. Renaming a method parameter in a subclass breaks LSP, so I believe ignoring it in these cases would avoid inducing the user to a bad practice.
Example using QGIS Python API:
class MyFeedback(QgsProcessingFeedback):
@override
def reportError(self, error: str, fatalError: bool = False) -> None: # noqa: N803
if fatalError:
logger.critical(error)
else:
logger.error(error)
fatalError
is not positional-only, so renaming it to fatal_error
would cause an error if the method was called as feedback.reportError("oh no", fatalError=True)
somewhere else.
Metadata
Metadata
Assignees
Labels
No labels