github / github/codeql

LGTM.com - false positive: The value assigned to local variable is never used

Đang mở
#5,228 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
false-positive not security 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**

The alert says "The value assigned to local variable 'resource_listed' is never used."

But the variable mentioned in that snippet IS used in the if-check several lines below.

At least, it is needed there for mypy type checking to be sure that the if-condition filters out all None values. Even if the logic hints that the None value is impossible due to the nearby condition on another variable.

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

https://lgtm.com/projects/g/nolar/kopf/snapshot/5f46eb0de621ecefaea2e5c3ca8965e1c213fea1/files/kopf/reactor/queueing.py?sort=name&dir=ASC&mode=heatmap#x20bb90834df18050:1

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.