Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Auto import broken for std modules #1939

Closed
@seik

Description

@seik

Environment data

  • Language Server version: 0.5.31
  • OS and version: macOS
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8
  • Using poetry 1.0.3

Expected behaviour

Std modules don't get action for missing imports.

Actual behaviour

Std modules should get the quick fix action with import option.

Code Snippet / Additional lnformation

I've set up a simple project to reproduce this, a colleague checked and he was able to reproduce. It's running poetry with the env configured in the same folder as the project.

https://github.com/seik/python-language-server-bug-std-imports

Steps to reproduce:

  • Open the project, and install everything with poetry: poetry install.
  • Check the environment is configured in VSCode and everything is loaded.
  • Close VSCode and reopen the project.
  • In the main.py file the csv module should have the quick fix action, close the file and reopen it. (Maybe the autoimport doesn't work in this step, closing the file and reopen ensures it fails)
  • csv file now doesn't have the quick fix action and all std modules are ignored when it comes to auto imports.

Related to #617 #625

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions