Conversation
| diskdev: Optional[str], | ||
| partnum: Optional[str], | ||
| partdev: str, | ||
| fs: Optional[str], | ||
| ) -> Tuple[Optional[int], Optional[int]]: | ||
| assert diskdev is not None | ||
| assert partnum is not None |
There was a problem hiding this comment.
This defeats the purpose of type annotations. You label it as Optional, but then throw an exception on the first line - this means that a caller that passes a NoneType will not by warned by type checking that this will crash the program.
There was a problem hiding this comment.
thanks for reviewing, I've removed the assert part and make them required str.
b455f8c to
65aaa9a
Compare
holmanb
left a comment
There was a problem hiding this comment.
Without dropping the module from the mypy overrides, this doesn't enable type checking on the module.
b78477e to
79f6e51
Compare
@holmanb I think the module was dropped in this commit 3082dcb#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711L39 |
|
Hello! Thank you for this proposed change to cloud-init. This pull request is now marked as stale as it has not seen any activity in 14 days. If no activity occurs within the next 7 days, this pull request will automatically close. If you are waiting for code review and you are seeing this message, apologies! Please reply, tagging blackboxsw, and he will ensure that someone takes a look soon. (If the pull request is closed and you would like to continue working on it, please do tag blackboxsw to reopen it.) |
ref: #5445 (comment)
chore: add type annotation to cloudinit.config.cc_growpart