"Unused import statement" warning is bundled with "Unresolved references" in inspection results.

Answered

I changed the severity of the "unresolved references" warning to an error, and now the "unused import" warning has also become an error.  Also, the unused import entries get put underneath the unresolved references header.  There doesn't seem to be a way to differentiate between the two.  I would like unused imports to remain a warning.  

Also, as a bonus, I would like pycharm to completely ignore when the following import is unused:

from builtins import *

How can I do it?  I tried adding it to the "Ignore references" in the Inspections settings, although it didn't take.  

PyCharm Community Edition 2017.1.4 running on Windows 7. 
 

6
2 comments

Hello,


> "Unused import statement" warning is bundled with "Unresolved references" in inspection results.

It's a known problem https://youtrack.jetbrains.com/issue/PY-10412, please follow it for updates. See http://intellij-support.jetbrains.com/entries/23368682 if you are not familiar with YouTrack.  

> Also, as a bonus, I would like pycharm to completely ignore when the following import is unused:
from builtins import *

The only way to make it is to put the caret on builtins, press Alt+Enter and select Optimize import (left arrow)| Suppress for statement. 

0
Avatar
Permanently deleted user

Is there a fix?

2

Please sign in to leave a comment.