Pylance removes unused import although using "# pyright: " to ignore (conftest.py) #4083
-
I'm importing pytest fixturs in conftest.py as per here. For relevance we are using pytest, black and flake8 with VS Code. However, the import is removed on save although I seem to be following the instructions as per #196.
also tried with (as per #2691 (reply in thread)):
What am I doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
what you need is |
Beta Was this translation helpful? Give feedback.
what you need is
# pyright: ignore
on the line. the one we use forremove unused imports
doesn't have rule name such asreportUnusedImport
,reportUnusedImport
is used to control reporting an error not theremove 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.