github / github/codeql

LGTM.com - false positive - Unnecessary deletion of local variable

Ouverte
#6,953 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
acknowledged false-positive not security Python
Langage dominant
CodeQL
Étoiles
10.1k
Forks
2.1k
Merge moyen
2 j 15 h
PR mergées (30 j)
141

Description

**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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.