-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Added typing annotations to models/segmentation #4227
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
Conversation
Docstring issue handled in #4228 |
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.
@frgfm Apologies for the delayed review. I had a look and added a few comments. Let me know what you think.
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.
Thanks @frgfm! I think we are almost there.
Could you have a quick look so that we can get this merged today?
aux: bool, | ||
aux: Optional[bool], |
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 not strict, but isn't Optional
constrained to argument with specified default value being 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.
It's because it can get None value from the calling methods... Mypy was complaining about it.
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 @frgfm, thanks a lot for your work and patience.
Will merge once tests pass.
86d5a23
to
9eaddd9
Compare
Summary: * style: Added typing annotations to segmentation/_utils * style: Added typing annotations to segmentation/segmentation * style: Added typing annotations to remaining segmentation models * style: Fixed typing of DeepLab * style: Fixed typing * fix: Fixed typing annotations & default values * Fixing python_type_check Reviewed By: fmassa Differential Revision: D30525894 fbshipit-source-id: 9926506955fba566ce61d17274ff7d86ed496383
Following up on #2025, this PR adds missing typing annotations in
models/segmentation
.Note to reviewers: I'm having trouble with the return types of the segmentation factory functions 🤷♂️
Any feedback is welcome!
cc @datumbox