spyder: New line creates whitespaces that conflict with PEP 8
Issue Report Checklist
- [ x ] Searched the issues page for similar reports
- [ x ] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
- [ x ] Reproduced the issue after updating with
conda update spyder(orpip, if not using Anaconda) - [ x ] Completed the Problem Description, Steps to Reproduce and Version sections below
Problem Description
When creating a new line by return in an indented environment, spyder makes whitespaces to keep the indentation. However, when subsequently keeping the line empty by pressing return again, those whitespaces make a PEP 8 warning .
What steps reproduce the problem?
- Open a new file
- Create an indentation, e.g. using an
if3 .Add some code - Have a blank line by double tapping return and then some more code
What is the expected output? What do you see instead?
A PEP8 warning occurs with whitespaces in blank line. My suggestion would be to catch if a line is intentionally blank and then remove the whitespaces needed for indentation. However, when the user decide to add code, the whitespaces have to be added manually to be on the right indentation which may be tedious.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 20 (19 by maintainers)
Yeah I thought that sounded too easy.