github / github/codeql

LGTM.com - false positive (python)

Đang mở
#4,755 1 bình luận 0 reaction 0 người được giao 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**

https://lgtm.com/projects/g/petercorke/spatialmath-python/snapshot/406209fe003b474951a109d907069933f48f82b7/files/spatialmath/base/__init__.py?sort=name&dir=ASC&mode=heatmap#xd0af4bbbf721847c:1

One function, getvector(), is singled out as being undefined. It is imported in line 5, and then in line 18 it is exported again. The function is defined at line 213 of

https://lgtm.com/projects/g/petercorke/spatialmath-python/snapshot/406209fe003b474951a109d907069933f48f82b7/files/spatialmath/base/argcheck.py#L213

and I can vouch that this works in production use.

I have no idea why just this function is flagged. However, it is the only function that has a NumPy constant as a default value for one of its function parameters

```
def getvector(v, dim=None, out='array', dtype=np.float64):
```

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.