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

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

Activity

  1. jakebailey commented on Mar 18, 2020

    @jakebailey
    Member

    I think there's a bug after #1896, which was recently-ish released to the public. Will have to investigate.

  2. MikhailArkhipov commented on Mar 19, 2020

    @MikhailArkhipov

    There was a regression and #1896 got reverted. Please try updated bits.

  3. seik commented on Mar 20, 2020

    @seik
    Author

    Can confirm now is working under 0.5.43.

    Closing this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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