If a module is imported twice in a script, it becomes undefined between the first and the second import. For example: import os print(os.name) # 'os' is underlined in green, tooltip says 'Undefined variable', 'name' is black import os print(os.name) # both 'os' and 'name' are highlighted green, no underline