Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer suggesting type alias as import #6799

Open
ManiMozaffar opened this issue Dec 25, 2024 · 0 comments
Open

No longer suggesting type alias as import #6799

ManiMozaffar opened this issue Dec 25, 2024 · 0 comments

Comments

@ManiMozaffar
Copy link

ManiMozaffar commented Dec 25, 2024

I'm having the same issue as #6567 , not sure why that was closed! And downgrading to PyLance 2024.9.2 would solve the issue for me.
I couldn't re-open the issue, that issue has every necessary information to reproduce.

Behaviour

Python no longer suggests type aliases from the project

Steps to reproduce:

Create type alias like this (TypeAlias type annotation doesn't matter): Component: TypeAlias = VdomDict | ReactpyComponent | ContextProviderType | str

Go to some other file in the project and try ctrl + . to try to import it. It is not an option. It is not an option under "search for other import matches". Adding a class to the same file shows up. If you search for the name with ctrl + t it shows up as the first option.

If I enable "enable aliases in user files", it still does not show up.

I created a fresh codespace to rule out some sort of corruption somewhere.

  • Python version (& distribution if applicable, e.g. Anaconda): 3.11.4
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): UV
  • Value of the python.languageServer setting: Default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant