Reputation: 23
When importing the Tkinter module, VS Code gives me a 100+ warning messages about unused imports. Is there a way to turn this off? Or should I be doing something different to avoid this?
Upvotes: 1
Views: 996
Reputation: 104
Becuase you're using from tkinter import *
python is importing everything in the tkinter module. You then get a warning for each class in tkinter that you aren't using. You can either just import the classes you need (from tkinter import Tk
), or turn off the warnings in visual studio settings (Tools > Options > Python).
Upvotes: 2