This repository has been archived by the owner on Feb 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 335
Add mypy to CI #1099
Closed
Closed
Add mypy to CI #1099
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b471d6d
Add mypy to CI
Andrew-Chen-Wang edb93c8
Add mypy to CI CHANGELOG
Andrew-Chen-Wang 17a9166
Use -r to install requirements
Andrew-Chen-Wang 9bcbb26
Remove ignored imports since we're in CI
Andrew-Chen-Wang 8bb3cb5
Run mypy on docs/examples
Andrew-Chen-Wang File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Adds mypy to CI |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to just run
mypy
with no arguments, and keep all configuration in.mypy.ini
.Good example of a config from one of our other repos:
https://github.com/aio-libs/aiohttp-jinja2/blob/master/.mypy.ini
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah just copied our makefile; good catch since we have all dependencies installed. Not sure of the reasoning behind the flag to begin with though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But, even the
aioredis
can be removed and just included in the config file asfiles = aioredis
.We'll also want mypy to run on tests/examples at some point as well. We've had bugs with type annotations which are only caught if you type check actual usage (plus it keeps the examples up-to-date with the library code).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have a config file, so updated in CI only. Maybe in the future.