Home > other >  VS code cannot tell what imported objects are
VS code cannot tell what imported objects are

Time:08-17

In one of my projects, I've made a separate file to test it out. When I import the classes from the first function (loot_tables.py) into the current file (test_loot_tables.py), I don't get any pop-ups for the dunder init. It can't even tell that the loot_tables object (which is a module) is a module. I'm in VS code using python version 3.9.1, and the classes I'm importing are dataclasses.

CodePudding user response:

Could you provide more context by supplying a minimal reproducible example ?

CodePudding user response:

I figured it out. Turns out, the folder the python file was in had the same name as the python file. So vscode tried to get the classes from the folder, and couldn't find them. Sorry!

  • Related