Skip to content
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

Better indication of whether image data was handled. #77

Merged
merged 4 commits into from Jun 1, 2016

Conversation

takluyver
Copy link
Member

Closes gh-71

@@ -708,22 +708,22 @@ def handle_iopub(self, msg_id=''):
def handle_rich_data(self, data):
for mime in self.mime_preference:
if mime in data and mime in self._imagemime:
self.handle_image(data, mime)
return True
return self.handle_image(data, mime)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don’t want to return False if one mime can’t be handled. maybe the next can?

@flying-sheep
Copy link
Contributor

flying-sheep commented Jun 1, 2016

hmm, we have to merge our PRs based on what we did differently:

  1. i have amended the docs, you didn’t. i think it’s good to document what callable_image_handler’s return value means
  2. you chose to only accept False as callable_image_handler’s return value to indicates failure, i also accept other falsey things apart from None
  3. i use the less configurable but more robust show

@takluyver
Copy link
Member Author

Updated the docs and used ImageShow.

@flying-sheep
Copy link
Contributor

looks good!

@minrk
Copy link
Member

minrk commented Jun 1, 2016

Thanks for reviewing, @flying-sheep!

@minrk minrk merged commit 49740dc into jupyter:master Jun 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants