-
Notifications
You must be signed in to change notification settings - Fork 277
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
Added missing typings. #2123
Added missing typings. #2123
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2123 +/- ##
============================================
+ Coverage 94.21% 94.56% +0.35%
Complexity 25 25
============================================
Files 204 205 +1
Lines 3943 4254 +311
Branches 29 29
============================================
+ Hits 3715 4023 +308
- Misses 222 225 +3
Partials 6 6
Continue to review full report at Codecov.
|
Signed-off-by: dblock <[email protected]>
def __init__(self, path): | ||
dependency_installer: DependencyInstallerOpenSearch | ||
|
||
def __init__(self, path: 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.
This method should also return None
?
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.
Yeah, so why isn’t mypi failing on this? Any ideas?
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.
Found the answer in https://mypy.readthedocs.io/en/stable/common_issues.html
init method has no annotated arguments or return type annotation. init is considered fully-annotated if at least one argument is annotated, while mypy will infer the return type as None.
To be consistent, added missing annotations in a8832cb
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.
I was wondering the same thing. Thanks for the explanation!
Signed-off-by: dblock <[email protected]>
Signed-off-by: dblock <[email protected]>
Signed-off-by: dblock <[email protected]>
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. Thanks.
Signed-off-by: dblock [email protected]
Description
Issues Resolved
Closes #1513
Closes #1512
Closes #1237
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.