Skip to content

Pylance removes unused import although using "# pyright: " to ignore (conftest.py) #4083

Discussion options

You must be logged in to vote

what you need is # pyright: ignore on the line. the one we use for remove unused imports doesn't have rule name such as reportUnusedImport, reportUnusedImport is used to control reporting an error not the remove unused import feature. that is why your comment didn't work. and since it is not actually type related error, # type: ignore doesn't work.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@erictraut
Comment options

@lfvjimisola
Comment options

@lfvjimisola
Comment options

@erictraut
Comment options

@erictraut
Comment options

Answer selected by lfvjimisola
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants