-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
chore: Enforce Mypy for non-tests #15757
chore: Enforce Mypy for non-tests #15757
Conversation
d38ecf8
to
dc36cb4
Compare
Codecov Report
@@ Coverage Diff @@
## master #15757 +/- ##
==========================================
- Coverage 76.89% 76.70% -0.19%
==========================================
Files 984 984
Lines 51662 51627 -35
Branches 6991 6988 -3
==========================================
- Hits 39724 39599 -125
- Misses 11714 11805 +91
+ Partials 224 223 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
541ddee
to
5f39b6f
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.
lgtm with one comment
@@ -61,7 +63,7 @@ def send_email( | |||
server.sendmail(sender_email, receiver_email, message) | |||
|
|||
|
|||
def render_template(template_file: str, **kwargs) -> str: | |||
def render_template(template_file: str, **kwargs: Any) -> str: |
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.
can kwargs
be Dict[str, Any]
?
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.
@etr2460 it's more nuanced than that. kwargs
are mostly represented as Any
elsewhere in the code base. I'll follow up with an additional PR which makes a sweep of the entire repo.
Also the declared type is not of kwargs
but rather **kwargs
so instead of Dict[str, Any]
it should be the type of the value, thus Any
is correct.
3f2e70e
to
180ea2b
Compare
Co-authored-by: John Bodley <john.bodley@airbnb.com>
Co-authored-by: John Bodley <john.bodley@airbnb.com>
Co-authored-by: John Bodley <john.bodley@airbnb.com>
SUMMARY
Spit-and-polish Mypy pass which strictly enforces Mypy checks for all Python files except the
tests
module. Note previously the rigorous tests only applied to thesuperset
module which meant scripts, etc. were excluded.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
CI.
ADDITIONAL INFORMATION