Skip to content

LGTM.com - false positive - Import is not used #6623

@DimitriPapadopoulos

Description

@DimitriPapadopoulos

Description of the false positive

The import is used in the sense that succeeding/failing to import sets a global variable.

have_numpy = True
try:
    import numpy
except ImportError:
    have_numpy = False

This pattern is quite common.

URL to the alert on the project page on LGTM.com

https://lgtm.com/projects/g/pydicom/pydicom/snapshot/c9a698b7632de3b412a402962a3af0b19ba8e53b/files/pydicom/config.py?sort=name&dir=ASC&mode=heatmap#x83292be155c0c9c8: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