LGTM.com - false positive - Unnecessary deletion of local variable
未关闭
acknowledged
false-positive
not security
Python
- 主要语言
- CodeQL
- 星标
- 10.1k
- 派生
- 2.1k
- 平均合并
- 2 天 15 小时
- 30 天内合并 PR
- 141
描述
**Description of the false positive**
LGTM generates alert about unnecessary deletion of a local variable at the end of a function. The variable stores an exception instance and is deleted in a finally clause to prevent creation of reference cycle when the exception is raised (Python adds a traceback to the raised exception, the traceback stores a frame that contains local variables with the exception among them).
**URL to the alert on the project page on LGTM.com**
https://lgtm.com/projects/g/NVIDIA/DALI/snapshot/908e133b686dacc440a81f3bc0c17b38c860745e/files/dali/python/nvidia/dali/_multiproc/pool.py?sort=name&dir=ASC&mode=heatmap#x845c6afe4552fbea:1
贡献指南
评估
这个 Issue 还没有评估数据。