-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
grass.jupyter: importing display function from IPython.display #4476
base: main
Are you sure you want to change the base?
Conversation
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.
Thank you. This is great. It looks like it is addressing the original idea in #4340.
I left two comments and I also modified the title to make it valid (there was a leading space) and I moved the referenced issue to the text.
python/grass/jupyter/map.py
Outdated
|
||
return Image(self._filename) | ||
return display(Image(self._filename)) |
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.
Is return needed here? What does IPython.display.display function return?
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.
Is return needed here? What does IPython.display.display function return?
No. We are not setting a display_id parameter, so IPython.display.display will 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.
Nice job working on this PR.
…rass into display_update
|
sir, is this correct PR ? |
Removed the return statement from the |
Seems like some basic code formatting and checking is still missing. Let us know once ready ;) |
python/grass/jupyter/map3d.py
Outdated
Image, | ||
display, | ||
) # pylint: disable=import-outside-toplevel | ||
|
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.
[ruff] reported by reviewdog 🐶
Image, | ||
display, # pylint: disable=import-outside-toplevel | ||
) | ||
display(Image(self._filename)) |
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.
[black] reported by reviewdog 🐶
display(Image(self._filename)) | |
display(Image(self._filename)) |
.pylintrc
Outdated
@@ -652,5 +652,6 @@ min-public-methods=1 | |||
|
|||
# Exceptions that will emit a warning when being caught. Defaults to | |||
# "BaseException, Exception". | |||
overgeneral-exceptions=BaseException, | |||
Exception | |||
overgeneral-exceptions=BaseException,Exception |
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 don't see a need for this change
.pylintrc
Outdated
@@ -654,3 +654,5 @@ min-public-methods=1 | |||
# "BaseException, Exception". | |||
overgeneral-exceptions=BaseException, | |||
Exception | |||
|
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.
Remove extra lines.
|
||
return Image(self._filename) | ||
from IPython.display import ( | ||
Image, |
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.
[black] reported by reviewdog 🐶
Image, | |
Image, |
importing display function from IPython.display to display the map image
Fixes #4340.