Skip to content

Auto import behavior clarification #967

@f279801

Description

@f279801

Hi,

I observed below behavior when using pyright with lsp-pyright:
A module is on shown up in the completion list for a python if and only if it has been already import by at least one other file in the same workspace. That's being said:

  • if I create an empty project
  • and create a new file file for it
  • Auto import for all modules in this file will not work.
  • But if I make another file, auto import for some modules in this file will work here if they already been imported by previous file.

Would you mind to confirm above behavior or we actually have a bug here. Besides, if it is the actual behavior then what is the reason behind it? To reduce the completion list and improve the speed?

/f

Metadata

Metadata

Assignees

No one assigned

    Labels

    as designedNot a bug, working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions