问题
The editor in Spyder always gives me warnings for unused imports/variables immediately after I type the line. I want to suppress such warnings. How do I do that? And I want this to happen for every file I open in the Spyder editor, wouldn't prefer local fixes.
I tried adding 'disable=' in ~/.pylintrc
and it didn't work. Moreover, the Spyder editor uses pyflakes anyway.
回答1:
You need to go to
Tools > Preferences > Editor > Code Introspection/Analysis
and deactivate the option called
Real-time code analysis
回答2:
locate preferences -> Editor -> Code Introspection/Analysis -> Deactivate/Uncheck the Real time code analysis Warning: It will also stop showing errors in the editor
来源:https://stackoverflow.com/questions/46568959/how-to-suppress-a-certain-warning-in-spyder-editor