-
-
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
Remove unnecessary newlines in run cell #3992
Comments
I think at least one new line is needed to get the console to evaluate the cell. But if you make that work, please send us a pull request :-) |
I tested it before opening the issue, it works. I added a pull request |
fixes this issue: spyder-ide#3992
@ccordoba12 this should beagainst what branch ? |
It's a very simple change, so I'd say We need to write a guide about how we manage our branches so that it's easier for external contributors to work with us. |
When running a cell, the cell that is actually ran in the ipython contains 2 redundant newlines in the end.
this is inconvenient because it reduces the amount of text you see in ipython console.
here is a fix:
in:
spyder/widgets/sourcecode/base.py
in the functionget_cell_as_executable_code
instead of
return text
write:
return text.rstrip()
This will also remove endlines added by the user which I think is actually a desired behavior anyway (for example, I tend to add newlines just to visually separate between one cell and the next one)
If you think this is good, I can create a pull request with the fix.
Note: right now, the newlines which are in the beginning of the cell are stripped anyway, so removing the trailing newlines just seems natural.
The text was updated successfully, but these errors were encountered: