unimport icon indicating copy to clipboard operation
unimport copied to clipboard

Incorrectly suggesting removal of module used in `TYPE_CHECKING`

Open ntjess opened this issue 1 year ago • 1 comments

from qtpy import QtCore
import typing as t

if t.TYPE_CHECKING:
    from PySide6 import QtCore


class MyThread(QtCore.QThread):
    pass

In this example, unimport suggests getting rid of the first QtCore import, but this causes the code to fail.

Tested on unimport 1.2.1

ntjess avatar Mar 23 '24 16:03 ntjess

Thanks for letting me know, I'll work on it.

hakancelikdev avatar May 27 '24 09:05 hakancelikdev