-
-
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
Open
rohannallamadge
wants to merge
21
commits into
OSGeo:main
Choose a base branch
from
rohannallamadge:display_update
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 15 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
20bd453
importing display function from IPython.display to display the map image
rohannallamadge 653139e
Merge branch 'main' into display_update
rohannallamadge e95c87d
grass.jupyter:Add _repr_pretty_ for better Jupyter/Quarto integration
rohannallamadge 4a8e906
Merge branch 'main' into display_update
rohannallamadge e5fb33c
grass.jupyter:update show() to return Image object instead of calling…
rohannallamadge 25345d9
Merge branch 'display_update' of https://github.com/rohannallamadge/g…
rohannallamadge fb89f80
git commit -m "Remove empty line as suggested by ruff"
rohannallamadge be3b9d8
Merge branch 'main' into display_update
rohannallamadge 66157e0
refactor: remove return from show() and use display() for inline rend…
rohannallamadge 8103055
Merge branch 'display_update' of https://github.com/rohannallamadge/g…
rohannallamadge 291030c
Merge branch 'main' into display_update
rohannallamadge 0cc242a
Removed empty line as suggested by ruff
rohannallamadge dcd7e56
Merge branch 'display_update' of https://github.com/rohannallamadge/g…
rohannallamadge 05d9b90
style: reformat import statements as suggested by black
rohannallamadge 9db48cd
Fix formatting of imports and remove duplicate display line
rohannallamadge 084d246
Update .pylintrc: fix overgeneral-exceptions and remove no-self-use o…
rohannallamadge 53e86f9
git commit -m "Fix formatting issues in parsetab.py"
rohannallamadge 6aef31c
Fix import organization based on review suggestion
rohannallamadge d16bbf3
Fix import organization based on review suggestion
rohannallamadge ebc6a71
Fix formatting display line
rohannallamadge e6a1395
Fix formatting display line
rohannallamadge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -232,6 +232,9 @@ | |||||||
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 | ||||||||
|
||||||||
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. [ruff] reported by reviewdog 🐶
Suggested change
|
||||||||
display(Image(self._filename)) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 🐶