-
Notifications
You must be signed in to change notification settings - Fork 255
Revert type checking changes to Image class #1405
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
Co-authored-by: fepegar <12688084+fepegar@users.noreply.github.com>
Co-authored-by: fepegar <12688084+fepegar@users.noreply.github.com>
Co-authored-by: fepegar <12688084+fepegar@users.noreply.github.com>
src/torchio/data/image.py
Outdated
| if not isinstance(fig, Figure): | ||
| message = f'Expected Figure, got {type(fig)}' | ||
| raise TypeError(message) |
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.
Undo this change
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.
Reverted in commit e5be8a9. The assert statement has been restored.
src/torchio/data/image.py
Outdated
| return None | ||
| else: | ||
| from ..visualization import plot_volume # avoid circular import | ||
|
|
||
| figure = plot_volume(self, **kwargs) | ||
| if return_fig: | ||
| assert figure is not None | ||
| return figure | ||
| 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.
Undo these changes
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.
Reverted in commit e5be8a9. The explicit return None statements have been removed.
Co-authored-by: fepegar <12688084+fepegar@users.noreply.github.com>
Description
Reverted previous type checking improvements to the
Imageclass based on maintainer feedback. The code has been restored to its original state from the base branch.Changes
return Nonestatements inplot()method_repr_html_()methodassertstatementsChecklist
CONTRIBUTINGdocs and have a developer setup ready✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.