-
Notifications
You must be signed in to change notification settings - Fork 30
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 #1639
Add mypy #1639
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1639 +/- ##
===========================================
+ Coverage 75.77% 75.78% +0.01%
===========================================
Files 43 43
Lines 5986 5997 +11
===========================================
+ Hits 4536 4545 +9
- Misses 1450 1452 +2
Continue to review full report at Codecov.
|
c329dfe
to
1f385cb
Compare
Thanks for taking this on! When I looked at this in #1615 it seemed valuable to install the type stubs for some of the imported packages too. I recommend deferring the mypy Github Action for now. We probably want to combine all three of pyflakes, black, and mypy into a single workflow to avoid too much overhead in spinning up containers. (There's a Github Action quota for private repositories but that wouldn't seem to apply here.) |
274071d
to
2747628
Compare
2747628
to
b555662
Compare
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.
Hooray for adding support for type annotation!
I have a bunch of little questions.
dc24df6
to
a940502
Compare
…practice, it never should be here.
Cool, thanks for doing this, and sorry to be so slow with approving the changes!! I'm going to take the liberty of pushing a few commits. StubsI pulled this code down and ran
I bet you ran
Regarding
|
Now let's see if I'm smart enough to resolve the merge conflict using the Github UI 😅 |
@rebeccacremona I can do this in a bit if you want since I'm more familiar with the code. |
629fe20
to
8b4768b
Compare
whoops, thanks, didn't see this! |
What
Adds mypy and django-stubs
Why
Static type checking is nice
How
.github/workflows/mypy.yml
Notes to Reviewers
web/main/admin.py
is ignored, along with any imports that may affectcheck_untyped_defs
was passed in as an option, there were errors I did not know how to fix due to an unfamiliarity with the codebasetyping.Sequence
is unused, but it's making mypy mad if it isn't there for some reason.