[LGTM.com - false positive] py/conflicting-attributes for abstract and concrete attribute
- 主要言語
- CodeQL
- スター
- 10.1k
- フォーク
- 2.1k
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 141
説明
**Description of the false positive**
I have a class that inherits after two classes (abstract and parent with implementation). The conflicting attribute is False-Positive because abstract class just defines abstract property that is inherited after parent class.
Example:
- abstract class
```
from abc import ABC, abstractmethod
class Abstract(ABC):
@property
@abstractmethod
def attribute(self):
"""Abstract atr"""
```
- parent class
```
class Parent:
@property
def attribute(self):
return "some expression"
```
- child class
```
class Child(Parent, Abstract): # <- alert reported
... # some additional code is here
```
[**URL to the alert on the project page on LGTM.com**](https://lgtm.com/projects/g/mdabrowski1990/uds/snapshot/857b583568c0a441827dc326dad749c389faf8a7/files/uds/packet/can_packet.py?sort=name&dir=ASC&mode=heatmap#x80c19aa17f79eb08:1)
コントリビューションガイド
評価
この issue はまだ評価されていません。