Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
psyplot-gui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
psyplot
psyplot-gui
Commits
97eb0c3d
Verified
Commit
97eb0c3d
authored
1 year ago
by
Philipp S. Sommer
Browse files
Options
Downloads
Patches
Plain Diff
ignore setting the sp and mp if not possible
parent
639b503d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!39
[release] compatibility and bug fixes, cli improvements and code formatting
,
!35
fix updating current projects in console
Pipeline
#342715
passed
1 year ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
psyplot_gui/console.py
+10
-2
10 additions, 2 deletions
psyplot_gui/console.py
with
10 additions
and
2 deletions
psyplot_gui/console.py
+
10
−
2
View file @
97eb0c3d
...
...
@@ -244,13 +244,21 @@ class ConsoleWidget(QtInProcessRichJupyterWidget, DockMixin):
"""
Update the `mp` variable in the shell is
``rcParams[
'
console.auto_set_mp
'
]`` with a main project
"""
if
self
.
rc
[
"
auto_set_mp
"
]
and
project
is
not
None
and
project
.
is_main
:
self
.
run_command_in_shell
(
"
mp = psy.gcp(True)
"
)
try
:
self
.
run_command_in_shell
(
"
mp = psy.gcp(True)
"
)
except
RuntimeError
:
# probably running a script that via IPythons `run` magick
pass
def
update_sp
(
self
,
project
):
"""
Update the `sp` variable in the shell is
``rcParams[
'
console.auto_set_sp
'
]`` with a sub project
"""
if
self
.
rc
[
"
auto_set_sp
"
]
and
(
project
is
None
or
not
project
.
is_main
):
self
.
run_command_in_shell
(
"
sp = psy.gcp()
"
)
try
:
self
.
run_command_in_shell
(
"
sp = psy.gcp()
"
)
except
RuntimeError
:
# probably running a script that via IPythons `run` magick
pass
def
show_current_help
(
self
,
to_end
=
False
,
force
=
False
):
"""
Show the help of the object at the cursor position if
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment