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

more aggressive typing #48

Merged
merged 3 commits into from
Sep 28, 2018
Merged

more aggressive typing #48

merged 3 commits into from
Sep 28, 2018

Conversation

JelleZijlstra
Copy link
Contributor

After upgrading async_timeout, I got some errors because I am running mypy with some stricter options (e.g., --no-implicit-optional, --disallow-any-generics). There's related discussion in python/mypy#5260, but in general I believe it's a good practice for libraries to be mypy-clean under strict settings, so that users can use those settings safely.

This PR adds a mypy.ini file with a number of stricter options and fixes the issues found in current async_timeout code.

Also, thanks for being so quick in adding typing and py.typed to your package!

@codecov
Copy link

codecov bot commented Jun 29, 2018

Codecov Report

Merging #48 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #48   +/-   ##
=======================================
  Coverage   94.02%   94.02%           
=======================================
  Files           1        1           
  Lines          67       67           
  Branches       11       11           
=======================================
  Hits           63       63           
  Misses          2        2           
  Partials        2        2
Impacted Files Coverage Δ
async_timeout/__init__.py 94.02% <100%> (ø) ⬆️

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 cb57707...937b500. Read the comment docs.

Copy link
Member

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

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

Thank you for the PR.
Sorry for late response, I have very limited spare time now.
Please address my comments (or describe why I'm wrong).

async_timeout/__init__.py Show resolved Hide resolved
mypy.ini Outdated Show resolved Hide resolved
@asvetlov asvetlov merged commit 01d7d33 into aio-libs:master Sep 28, 2018
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.

3 participants