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

Mypy coverage #5457

Merged
merged 5 commits into from
Feb 8, 2021
Merged

Mypy coverage #5457

merged 5 commits into from
Feb 8, 2021

Conversation

Dreamsorcerer
Copy link
Member

Provide some better Mypy coverage. Enables some more options that are useful and adds examples/ into the checker (which helps ensure our public API is correct, and helps keep the examples themselves up-to-date).

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Feb 7, 2021
@@ -74,7 +74,7 @@ fmt format:

.PHONY: mypy
mypy:
mypy --show-error-codes aiohttp tests
mypy
Copy link
Member Author

Choose a reason for hiding this comment

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

With no arguments, it uses the files and options in the config file.

@@ -50,7 +51,7 @@ def __init__(self) -> None:
web.get("/v2.7/me/friends", self.on_my_friends),
]
)
self.runner = None
self.runner = web.AppRunner(self.app)
Copy link
Member Author

Choose a reason for hiding this comment

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

This example has clearly not been run in several years. :P

files = aiohttp, examples, tests
check_untyped_defs = True
follow_imports_for_stubs = True
#disallow_any_decorated = True
Copy link
Member Author

@Dreamsorcerer Dreamsorcerer Feb 7, 2021

Choose a reason for hiding this comment

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

These 2 commented out, we should consider in the future, but will need a ~50 errors to be cleaned up or ignored first.

@codecov
Copy link

codecov bot commented Feb 7, 2021

Codecov Report

Merging #5457 (e450e95) into master (1a98940) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5457   +/-   ##
=======================================
  Coverage   97.17%   97.17%           
=======================================
  Files          41       41           
  Lines        8768     8769    +1     
  Branches     1404     1404           
=======================================
+ Hits         8520     8521    +1     
  Misses        130      130           
  Partials      118      118           
Flag Coverage Δ
unit 97.05% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiohttp/resolver.py 93.33% <100.00%> (+0.15%) ⬆️
aiohttp/worker.py 97.45% <100.00%> (ø)

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 1a98940...e450e95. Read the comment docs.

@webknjaz webknjaz merged commit d6e51d9 into master Feb 8, 2021
@webknjaz webknjaz deleted the mypy branch February 8, 2021 00:50
@webknjaz
Copy link
Member

webknjaz commented Feb 8, 2021

@Dreamsorcerer would you take care of backporting plz?

alandtse pushed a commit to alandtse/aiohttp that referenced this pull request Feb 14, 2021
Co-authored-by: Sam Bull <git@sambull.org>
commonism pushed a commit to commonism/aiohttp that referenced this pull request Apr 27, 2021
Co-authored-by: Sam Bull <git@sambull.org>
commonism pushed a commit to commonism/aiohttp that referenced this pull request Apr 27, 2021
Co-authored-by: Sam Bull <git@sambull.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants