codeql icon indicating copy to clipboard operation
codeql copied to clipboard

LGTM.com - false positive, cyclic import of standard library io

Open GavinHuttley opened this issue 3 years ago • 2 comments
trafficstars

Description of the false positive

Within the project module cogent3.util.io, importing from the standard library io is incorrectly labelled as a cyclic import.

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

https://lgtm.com/projects/g/cogent3/cogent3/snapshot/5a0681419073defd215a681e1e6f15affcca38e0/files/src/cogent3/util/io.py?sort=name&dir=ASC&mode=heatmap#x3f884baea6ca5fdd:1

GavinHuttley avatar Jun 27 '22 22:06 GavinHuttley

Thanks for reporting. I think you're right. The analysis seems to confuse the cogent3.util.io and the io library.

aibaars avatar Jun 28 '22 09:06 aibaars

This issue also affects mypy, where it probably confuses mypy.types with stdlib types, see example (note there are also some legitimate errors in that and other files, but errors related to imports from typing, enums etc are all false positives).

ilevkivskyi avatar Aug 06 '22 16:08 ilevkivskyi