github / github/codeql

LGTM.com - false positive: Python metaclass

Đang mở
#2,445 10 bình luận 2 reaction 1 người được giao Được @BekaValentine nhận Xem trên GitHub
false-positive Python
Ngôn ngữ chính
CodeQL
Star
10.1k
Fork
2.1k
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
141

Mô tả

**Description of the false positive**
Classes may have metaclasses in Python. If the **metaclass** has a `__call__` function, then calling the **class** should require the same number of arguments than the `__call__` function of the **metaclass** has.
See [https://docs.python.org/3/reference/datamodel.html#object.__call__](https://docs.python.org/3/reference/datamodel.html#object.__call__)

**URL to the alert on the project page on LGTM.com**: https://lgtm.com/projects/g/secdev/scapy/snapshot/4d06eb2812a98a1001478bf06e033fbbb2afbef7/files/scapy/sendrecv.py#L844

See:

> Call to PcapReader.__init__ with too few arguments; should be no fewer than 3.

If you need more help understanding the issue ping me and I'll make a snippet. This code isn't the easiest to catch on

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.