Skip to content

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

Open
@stiepan

Description

@stiepan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions