-
-
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?
Changes from 19 commits
20bd453
653139e
e95c87d
4a8e906
e5fb33c
25345d9
fb89f80
be3b9d8
66157e0
8103055
291030c
0cc242a
dcd7e56
05d9b90
9db48cd
084d246
53e86f9
6aef31c
d16bbf3
ebc6a71
e6a1395
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Remove extra lines. |
||
|
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -188,9 +188,11 @@ def wrapper(**kwargs): | |||||||
def show(self): | ||||||||
"""Displays a PNG image of map""" | ||||||||
# Lazy import to avoid an import-time dependency on IPython. | ||||||||
from IPython.display import Image # pylint: disable=import-outside-toplevel | ||||||||
|
||||||||
return Image(self._filename) | ||||||||
from IPython.display import ( | ||||||||
Image, | ||||||||
display, # pylint: disable=import-outside-toplevel | ||||||||
) | ||||||||
display(Image(self._filename)) | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [black] reported by reviewdog 🐶
Suggested change
|
||||||||
|
||||||||
def save(self, filename): | ||||||||
"""Saves a PNG image of map to the specified *filename*""" | ||||||||
|
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -232,6 +232,8 @@ def render(self, **kwargs): | |||||||
def show(self): | ||||||||
"""Displays a PNG image of map""" | ||||||||
# Lazy import to avoid an import-time dependency on IPython. | ||||||||
from IPython.display import Image # pylint: disable=import-outside-toplevel | ||||||||
|
||||||||
return Image(self._filename) | ||||||||
from IPython.display import ( | ||||||||
Image, | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [black] reported by reviewdog 🐶
Suggested change
|
||||||||
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.
I don't see a need for this change