LGTM.com - false positive (python)
- 主要語言
- CodeQL
- 星號
- 10.1k
- 分支
- 2.1k
- 平均合併
- 2 天 15 小時
- 30 天內合併 PR
- 141
描述
**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):
```
貢獻指南
評估
這個 Issue 還沒有評估資料。