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

Intellisense: from flask import request | request: <unknown type> #2598

Closed
DubbleClick opened this issue May 27, 2017 · 1 comment
Closed

Comments

@DubbleClick
Copy link

I am importing a bunch of things from Flask (latest version) and Intellisense is working for all of them but the standard Request object "request", which Intellisense does not recognise. Intellisense recognises all other imports and works correctly there.

The code is running, it is however annoying to have most of intellisense break down completely just because it's not able to resolve a single import.

@zooba
Copy link
Member

zooba commented May 30, 2017

When you say "does not recognize", do you mean that it shows up as an unknown type? This is somewhat expected, as Flask uses a wrapper class around a thread-local variable for request (and some other globals), which makes it such that it is impossible to determine its true type without an actual request existing.

Our aim is to solve these issues by eventually supporting type hints (#82) and hoping that Flask will also add support for them. There's really nothing else we can reliably do about it with a type this complex right now.

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