Skip to content

Stub for flask #28

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

Closed
gvanrossum opened this issue Nov 21, 2015 · 15 comments
Closed

Stub for flask #28

gvanrossum opened this issue Nov 21, 2015 · 15 comments
Labels
stubs: request OUTDATED! Request to add stubs for a new package to typeshed

Comments

@gvanrossum
Copy link
Member

I could make one. Will work with @mitsuhiko to vet it.

@nlyubchich
Copy link

Is there any progress for this issue? Any help is needed?

@zoidyzoidzoid
Copy link

Additional offer to help.

@zoidyzoidzoid
Copy link

Should I start working on a PR maybe, and mitsuhiko or @pallets folk can take a look at it?

@gvanrossum
Copy link
Member Author

We would be happy to accept a PR as long as the current flaks maintainers
are okay with it. Usually asking in their tracker and posting a link to a
positive response works well.

--Guido (mobile)

@rowillia
Copy link
Contributor

rowillia commented Sep 7, 2016

Flask folks gave permission here - pallets/flask#2012

@gvanrossum
Copy link
Member Author

gvanrossum commented Sep 7, 2016 via email

@zoidyzoidzoid
Copy link

I've started working on it, and will happily accept PRs or any input: https://github.com/zoidbergwill/typeshed

Is there any documentation on tips on creating new stubs?

I've used stubgen, and am working on each file one by one now.

@gvanrossum
Copy link
Member Author

Hm, I think the best way to learn how to create stubs ATM is probably to read a bunch of existing stubs. Please do understand that stubgen doesn't infer argument types except if there's a default, so you should add those manually. Also, there's no way to test that the stubs you create match the real flask library -- the way to assess that is typically to add annotations to a mid-size app using flask and to verify that the app both runs correctly and type-checks cleanly.

@zoidyzoidzoid
Copy link

Awesome, thanks. Browsing all the existing stubs in this repo have been how I've been figuring it out so far.

Thanks, will try that out. I have some Flask apps with some annotation coverage which I'll improve and then test it on.

@rowillia
Copy link
Contributor

rowillia commented Sep 9, 2016

@zoidbergwill I've got a PR open that adds stubs to werkzeug - #530

rowillia pushed a commit to rowillia/typeshed that referenced this issue Sep 12, 2016
@zoidyzoidzoid
Copy link

Thanks @rowillia Should I wait and then reuse some of your new types you're adding?

gvanrossum pushed a commit that referenced this issue Sep 18, 2016
@octylFractal
Copy link

Any progress on this? I'd like to use these.

@zoidyzoidzoid
Copy link

I started work on it here ages ago, but the tooling for starting a fresh stub might have improved since then.

@TimotheeJeannin
Copy link

TimotheeJeannin commented May 7, 2018

Would be nice to have Flask stubs ! Any progress on this ?

@srittau srittau added stubs: request OUTDATED! Request to add stubs for a new package to typeshed size-large labels Sep 11, 2018
ilevkivskyi pushed a commit that referenced this issue Jan 30, 2019
@ilevkivskyi
Copy link
Member

@vivaldus

It's disconcerting to me -- a new/prospective user of mypy -- that a python product as well-known as flask doesn't have typings after all this time.

Have you noticed that this issue is closed? The stubs were added couple weeks ago and actually went into the latest mypy release.

But more importantly, what was the purpose of this comment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stubs: request OUTDATED! Request to add stubs for a new package to typeshed
Projects
None yet
Development

No branches or pull requests

8 participants