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

Use correct type for add_view #3633

Merged
merged 2 commits into from Jul 5, 2019

Conversation

@kornicameister
Copy link
Contributor

commented Mar 3, 2019

What do these changes do?

They are changing the type declaration for add_view in router. Previously it said that it was to be AbstractView but that required an instance of the AbstractView subclass. The documentation stands for it to be the class, hence changing the typing to Type[AbstractView].

Are there changes in behavior for the user?

No more mypy errors when using add_view method/function.

Related issue number

Fixes #3653

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> for example (588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."

@kornicameister kornicameister requested a review from asvetlov as a code owner Mar 3, 2019

@kornicameister

This comment has been minimized.

Copy link
Contributor Author

commented Mar 3, 2019

@asvetlov tests and mypy went fine for me locally. However I noticed that isort started to complain on master state (today). I didn't pushed those changes though. If you want to me to create an issue so there's a track, let me know.

@codecov-io

This comment has been minimized.

Copy link

commented Mar 3, 2019

Codecov Report

Merging #3633 into master will decrease coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3633      +/-   ##
==========================================
- Coverage    97.9%   97.84%   -0.06%     
==========================================
  Files          43       43              
  Lines        8556     8649      +93     
  Branches     1376     1381       +5     
==========================================
+ Hits         8377     8463      +86     
- Misses         74       81       +7     
  Partials      105      105
Impacted Files Coverage Δ
aiohttp/web_routedef.py 100% <100%> (ø) ⬆️
aiohttp/web_urldispatcher.py 99.25% <100%> (ø) ⬆️
aiohttp/frozenlist.py 97.87% <0%> (-2.13%) ⬇️
aiohttp/connector.py 96.36% <0%> (-1.32%) ⬇️
aiohttp/payload.py 98.13% <0%> (-0.47%) ⬇️
aiohttp/web_request.py 96.99% <0%> (-0.45%) ⬇️
aiohttp/client_reqrep.py 97.02% <0%> (-0.32%) ⬇️
aiohttp/web_runner.py 97.64% <0%> (-0.29%) ⬇️
aiohttp/streams.py 98.44% <0%> (-0.27%) ⬇️
aiohttp/http_websocket.py 98.62% <0%> (-0.03%) ⬇️
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 398b5ba...86faab1. Read the comment docs.

@Hanaasagi

This comment has been minimized.

Copy link

commented Mar 20, 2019

It will resolve: #123

@kornicameister

This comment has been minimized.

Copy link
Contributor Author

commented Apr 19, 2019

@asvetlov will it be possible to give it a look?
@webknjaz sorry to bother you too, but maybe if @asvetlov is busy, you might give it a shot?

@kornicameister

This comment has been minimized.

Copy link
Contributor Author

commented May 19, 2019

Hmm..I have tried to sign the CLA, but for some reason there are requests in https://cla-assistant.io/aio-libs/aiohttp?pullRequest=3633 that fail with 401. Not sure why though.

@asvetlov

This comment has been minimized.

Copy link
Member

commented May 19, 2019

Sorry, @kornicameister
I've added CLA checker, but it had problems.
Later I've removed the app but github still has CLA in the checklist for existing PRs.
Just ignore it.
I'm slowly iterating over aiohttp PRs waiting for review, please keep calm.
The review process is not fast because I've committed to finish some work for asyncio on upcoming Python 3.8. The feature freeze is in less than 2 weeks.
After that date I can dedicate much more time to work on aiohttp

@kornicameister

This comment has been minimized.

Copy link
Contributor Author

commented May 19, 2019

Ah, ok...I though that maybe the PR is not being checked because of missing CLA :/. I shall be calm :)

GL with Python 3.8.

@asvetlov asvetlov merged commit 5ea9169 into aio-libs:master Jul 5, 2019

5 of 6 checks passed

LGTM analysis: JavaScript No code changes detected
Details
LGTM analysis: Python No new or fixed alerts
Details
Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
codecov/patch 100% of diff hit (target 97.9%)
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@asvetlov

This comment has been minimized.

Copy link
Member

commented Jul 5, 2019

Thanks!

asvetlov added a commit that referenced this pull request Jul 5, 2019
[3.5] Use correct type for add_view (#3633)
(cherry picked from commit 5ea9169)

Co-authored-by: Tomasz Trębski <kornicameister@gmail.com>
asvetlov added a commit that referenced this pull request Jul 5, 2019
[3.5] Use correct type for add_view (#3633) (#3886)
(cherry picked from commit 5ea9169)

Co-authored-by: Tomasz Trębski <kornicameister@gmail.com>

@kornicameister kornicameister deleted the kornicameister:type_add_view branch Jul 5, 2019

@kornicameister

This comment has been minimized.

Copy link
Contributor Author

commented Jul 5, 2019

@asvetlov Cheers 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.