-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Add missing signal to convert notebooks from the project explorer #3956
Conversation
spyder/plugins/projects.py
Outdated
@@ -52,6 +52,8 @@ class Projects(ProjectExplorerWidget, SpyderPluginMixin): | |||
sig_project_loaded = Signal(object) | |||
sig_project_closed = Signal(object) | |||
|
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.
please remove the space?
spyder/plugins/projects.py
Outdated
@@ -136,6 +138,9 @@ def register_plugin(self): | |||
|
|||
self.sig_open_file.connect(self.main.open_file) | |||
|
|||
new_file_f = lambda x: self.editor.new(text=x) | |||
self.sig_new_file.connect(new_file_f) |
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.
The idea of lambdas in general is to use them right away and not assign them to a variable, otherwise is better and clearer to use an actual function, so with that spirit in mind...
This is ok
self.sig_new_file.connect(lambda x: self.editor.new(text=x))
Thanks for the fix @andfoy, left a couple of comments :-) Remember to move the PR to the correct Pipe (Ready for review I assume?) |
There are Conda related errors in both CI engines |
@ccordoba12 do we need this https://github.com/spyder-ide/spyder/blob/master/continuous_integration/travis/install.sh#L54 It might be the issue |
@andfoy, @ccordoba12 fixed out errors in Appveyor and Travis. Please rebase so we can merge your work in Spyder 3 :-) |
@andfoy, please don't touch this branch until I fix the errors in Appveyor. Those are unrelated to your work. |
98376c7
to
9776b01
Compare
@goanpeca, we should add a test for this one. |
9776b01
to
eeb7543
Compare
I rebased this one and added a test for it. It took me an hour and a half to come up with one!! :-p But the good thing is that now we're also testing Projects (even if minimally, but it's something ;-) |
Fixes #3823