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

Add mypy to CI for cpython #75

Merged
merged 3 commits into from
Dec 12, 2019
Merged

Add mypy to CI for cpython #75

merged 3 commits into from
Dec 12, 2019

Conversation

cooperlees
Copy link
Contributor

  • Lets ensure we stay type awesome.

- Also fix all type errors with latest mypy
- pycares seems to have no typing / stubs so lets ignore it via `mypy.ini`
@saghul saghul merged commit 680f5ad into aio-libs:master Dec 12, 2019
@saghul
Copy link
Contributor

saghul commented Dec 12, 2019

Looking good, thank you!

@@ -75,21 +75,21 @@ def query(self, host, qtype):
qtype = query_type_map[qtype]
except KeyError:
raise ValueError('invalid query type: {}'.format(qtype))
fut = asyncio.Future(loop=self.loop)
fut = asyncio.Future(loop=self.loop) # type: asyncio.Future
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually mypy with the strict option reports Missing type parameters for generic type "Future". Indeed, nobody knows what will be returned when that future will be awaited.

Copy link
Contributor

Choose a reason for hiding this comment

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

@cooperlees Sorry. Looks like futures can't be annotated.

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