LGTM.com - false positive - incorrect-overridden-signature and decorators
- Ngôn ngữ chính
- CodeQL
- Star
- 10.1k
- Fork
- 2.1k
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 141
Mô tả
**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
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.