github / github/codeql

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

Abierto
#8,804 1 comentario 0 reacciones 0 asignados Ver en GitHub
acknowledged false-positive not security
Lenguaje dominante
CodeQL
Estrellas
10.1k
Forks
2.1k
Merge medio
2 d 15 h
PR fusionados (30 d)
141

Descripción

**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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.