github / github/codeql

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

未關閉
#8,804 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
acknowledged false-positive not security
主要語言
CodeQL
星號
10.1k
分支
2.1k
平均合併
2 天 15 小時
30 天內合併 PR
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 摘要。