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

Problem about the new sugession type hint in vs code editor #2040

Open
RanaUniverse opened this issue May 3, 2024 · 1 comment
Open

Problem about the new sugession type hint in vs code editor #2040

RanaUniverse opened this issue May 3, 2024 · 1 comment

Comments

@RanaUniverse
Copy link

Yesterday after the new release of this library i tried to check diffent things, and found this below:::

image

image

as i got from the sugession i thought i can call the building name parameter without any parameter value and it will return a string, but it is not 😢

See when i get the type hint, i find this and try to get different things checking, but when i did it,
i found, i got a suggestions as building_name but when i use it and then run this code in vs code, it shows like this, error,
so i say is this type of suggestions is wrong here, how to stop this wrong suggestions here, or any mistake i am doing here ?

@fcurella
Copy link
Collaborator

fcurella commented May 3, 2024

The issue is that the type stubs are not locale-aware. They pull methods from providers across all locales, even if the instance you're using does not have the building_name method.

So let's say the address provider for jp_JP defines building_name(), but the en_US doesn't. building_name() will be in the suggestions even when you're using en_US.

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

2 participants