LGTM.com - false positive - incorrect-overridden-signature and decorators
- Linguagem predominante
- CodeQL
- Estrelas
- 10.1k
- Forks
- 2.1k
- Merge médio
- 2d 15h
- PRs com merge (30d)
- 141
Descrição
**Python decorators usage are shown as error**
This is the error I get when I decorate a method from a subclass with a retry decorator:
> Overridden method signature does not match call, where it is passed too few arguments. Overriding method function retry_decorator.wrapper.inner matches the call.
I believe that decorating a subclass method redefinition is not a break of the Liskov principle, it is just adding another layer of retries. The interface of the method does not change, just the behaviour changes, thus not breaking any principle of an overriden method.
The exact error code:
https://lgtm.com/projects/g/cloudbase/cloudbase-init/snapshot/6e7343201eaa9412e5a70065667b4390242646f3/files/cloudbaseinit/osutils/base.py?sort=name&dir=ASC&mode=heatmap#xa35fdb3e06a26f57:1
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.