github / github/codeql

LGTM.com - false positive - classmethod() vs. @classmethod

Aperta
#6,518 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
false-positive Python
Lingua principale
CodeQL
Stelle
10.1k
Fork
2.1k
Merge medio
2g 15h
PR unite (30g)
141

Descrizione

**Description of the false positive**

LGTM.com appears to detect classes with the `@classmethod` decorator:
```python
@classmethod
def from_filename(cls):
[....]
```
but not classes with the subsequent `classmethod`() call:
```python
def from_filename(cls):
[....]

from_filename = classmethod(from_filename)
```

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

https://lgtm.com/projects/g/nilearn/nilearn/snapshot/0cd925e33787e277990b524efeba0c8125d04816/files/nilearn/externals/tempita/__init__.py?sort=name&dir=ASC&mode=heatmap#x264089f243e25194:1

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.