github / github/codeql

LGTM.com - false positive - py/missing-equals

オープン
#8,804 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
acknowledged false-positive not security
主要言語
CodeQL
スター
10.1k
フォーク
2.1k
平均マージ
2日 15時間
マージ済み PR(30日)
141

説明

**Description of the false positive**

Talk is cheap, show you the code.

```python3
class AbstractClass(abc.ABC):
def __init__(self):
self.a = None

class SuperClass(AbstractClass):
def __init__(self):
super().__init__()
self.b = None # <-- Hey, 'b' is here!

def __eq__(self, other):
return type(self) == type(other) and self.a == other.a and self.b == other.b

class SubClass(SuperClass):
def __init__(self):
super().__init__()
self.b = 'b' # <-- LGTM: The class 'SubClass' does not override '__eq__', but adds the new attribute 'b'.
```

**URL to the alert on the project page on LGTM.com**

https://lgtm.com/projects/g/Rongronggg9/RSS-to-Telegram-Bot/snapshot/006cdf55960512e609e7021e4b6785c2d456e3a5/files/src/parsing/medium.py#x1c4917a8f7d52c7f:1

https://lgtm.com/projects/g/Rongronggg9/RSS-to-Telegram-Bot/snapshot/006cdf55960512e609e7021e4b6785c2d456e3a5/files/src/parsing/medium.py#xda2ab04a8ecf9132:1

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。