Skip to content

Create stubs for Flask - #2740

Merged
ilevkivskyi merged 3 commits into
python:masterfrom
pcorpet:flask
Jan 30, 2019
Merged

ilevkivskyi merged 3 commits into
python:masterfrom
pcorpet:flask

Conversation

@pcorpet

@pcorpet pcorpet commented Jan 14, 2019 •

Copy link
Copy Markdown
Contributor

See permission in pallets/flask#2012.

Fixes #28.

@ilevkivskyi ilevkivskyi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a Flask user, but I discovered couple hundreds possible false positives when trying these stubs with our internal codebase. 95% of them however fall into few categories below.

@JelleZijlstra @srittau Could one of you please also take a look at this PR?

Comment thread third_party/2and3/flask/globals.pyi Outdated
Comment thread third_party/2and3/flask/app.pyi
Comment thread third_party/2and3/flask/views.pyi
Comment thread third_party/2and3/flask/globals.pyi
Comment thread third_party/2and3/flask/globals.pyi
Comment thread third_party/2and3/flask/app.pyi

@ilevkivskyi ilevkivskyi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is almost ready. You just need to add the metaclass, and two comments.

Comment thread third_party/2and3/flask/app.pyi
Comment thread third_party/2and3/werkzeug/wrappers.pyi

@ilevkivskyi ilevkivskyi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM now.

@ilevkivskyi

Copy link
Copy Markdown
Member

@srittau @JelleZijlstra If there are no objections, I will merge this soon, so that we can move forward.

@ilevkivskyi
ilevkivskyi merged commit 75581cf into python:master Jan 30, 2019
LarsMichelsen added a commit to LarsMichelsen/typeshed that referenced this pull request Apr 14, 2020
…n#3913)

The PR python#2740 added __setattr__ and __getattr__ to the
werkzeug.wrappers.BaseRequest definition to silence mypy when
monkeypatching this class.

The change disabled the errors for monkeypatching, but disabled disabled the
important check attr-defined.
srittau pushed a commit that referenced this pull request Apr 25, 2020
#3925)

The PR #2740 added __setattr__ and __getattr__ to the
werkzeug.wrappers.BaseRequest definition to silence mypy when
monkeypatching this class.

The change disabled the errors for monkeypatching, but disabled disabled the
important check attr-defined.
vishalkuo pushed a commit to vishalkuo/typeshed that referenced this pull request Jun 26, 2020
…n#3913) (python#3925)

The PR python#2740 added __setattr__ and __getattr__ to the
werkzeug.wrappers.BaseRequest definition to silence mypy when
monkeypatching this class.

The change disabled the errors for monkeypatching, but disabled disabled the
important check attr-defined.
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

Successfully merging this pull request may close these issues.

2 participants