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

Missing Intellisense Autocompletions for urllib #4511

Closed
sharoncxu opened this issue Sep 3, 2020 · 1 comment
Closed

Missing Intellisense Autocompletions for urllib #4511

sharoncxu opened this issue Sep 3, 2020 · 1 comment

Comments

@sharoncxu
Copy link

sharoncxu commented Sep 3, 2020

Currently using Intellisense + Pylance Extension in VS Code.

In the following code, the autocompletion doesn’t show getcode() as an option when writing “f.” in the last line. (The completion works fine for “urlib.” and “urllib.request.”)

`import urllib.request
import urllib.parse

f = urllib.request.urlopen("https://www.microsoft.com")

f.getcode()`

@hauntsaninja
Copy link
Collaborator

getcode exists in typeshed. The issue is that the return type of urlopen is currently typed as Any.

There's more context here, for when that return type was changed:
#3026
#3045

I'm going to close, since those changes were intentional about what they were doing.

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