LGTM.com - false positive - Unnecessary deletion of local variable
- Vorherrschende Sprache
- CodeQL
- Sterne
- 10.1k
- Forks
- 2.1k
- Ø Merge
- 2 T. 15 Std.
- Gemergte PRs (30 T.)
- 141
Beschreibung
**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
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.