0

Take the following folder structure.

sidebar-update
    __init__.py
    index.py
    results.py

When importing a given function in index.py from results.py with the statement

from results import getResultsTable

VSCode produces the following linting problem.

unresolved import 'results'Python(unresolved-import)

I take this as the linter searching solely for installed modules and ignoring local files. How can I add this functionality so that it recognizes valid import statements?

Gama11
  • 31,714
  • 9
  • 78
  • 100
Joao Pereira
  • 573
  • 4
  • 16

1 Answers1

1

Fixed it by enabling jedi and disabling Visual Studio IntelliCode for Python. Apparently it was a language server issue.

Joao Pereira
  • 573
  • 4
  • 16
  • I didn't have Visual Studio IntelliCode installed, but had the same issue. Disabling Pylance did the trick for me, leaving the MS Python IntelliSense extension enabled. – Doug May 11 '21 at 06:36