Skip to content
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

Auto indentation of line following indented block #3800

Closed
dhendricks-medic opened this issue Dec 7, 2016 · 2 comments
Closed

Auto indentation of line following indented block #3800

dhendricks-medic opened this issue Dec 7, 2016 · 2 comments

Comments

@dhendricks-medic
Copy link

The Problem:
If I have a block of indented code, followed by a block of un-indented code, and I attempt to insert additional (blank) lines between the two, pressing enter causes the un-indented line of code to automatically indent.

If this is a bug, it needs to be fixed, if it is a "feature" then it needs to be made optional.

What steps will reproduce the problem?

  1. A line of indented code, followed by a line of un-indented code.
  2. Press enter on the un-indented line of code.
    image

What is the expected output? What do you see instead?
Expected Output: the "un-indented" line of code moves down a line, and remains un-indented.
image

Actual Output: the "un-indented" line of code moves down a line and becomes indented.
image

Please provide any additional information below
Note, this occurs if the two lines directly follow each other, or if there are additional blank (un-indented) lines between them.

I tried toggling the auto indention in the options, but it didn't make a difference.
image

Thanks.

Versions and main components

  • Spyder Version: 3.0.2
  • Python Version: 3.5.2 64bits, Qt 5.6.0, PyQt5 5.6 on Windows
  • Operating system: Windows 10

Dependencies

jedi >=0.8.1 : 0.9.0 (OK)
matplotlib >=1.0 : 1.5.3 (OK)
nbconvert >=4.0 : 4.2.0 (OK)
numpy >=1.7 : 1.11.1 (OK)
pandas >=0.13.1 : 0.18.1 (OK)
pep8 >=0.6 : 1.7.0 (OK)
pyflakes >=0.6.0 : 1.3.0 (OK)
pygments >=2.0 : 2.1.3 (OK)
pylint >=0.25 : 1.6.4 (OK)
qtconsole >=4.2.0: 4.2.1 (OK)
rope >=0.9.4 : 0.9.4-1 (OK)
sphinx >=0.6.6 : 1.5 (OK)
sympy >=0.7.3 : 1.0 (OK)

@ccordoba12 ccordoba12 added this to the v3.2 milestone Dec 8, 2016
pwoosam added a commit to pwoosam/spyder that referenced this issue Dec 10, 2016
Added a checkbox to editor's preferences for enabling and disabling
strict indentation.
Strict indentation will not indent if the above line is whitespace.
pwoosam added a commit to pwoosam/spyder that referenced this issue Dec 11, 2016
If the previous line is unindented, the next one will be aswell.
pwoosam added a commit to pwoosam/spyder that referenced this issue Dec 11, 2016
If the previous line is unindented, the next one will be aswell.
@ccordoba12 ccordoba12 modified the milestones: v3.1, v3.2 Jan 5, 2017
@dhendricks-medic
Copy link
Author

Thanks for looking in to this.

I'm new to how the process of updating spyder works, when will this update be pushed to production? If I run "conda update spyder" will this be updated on my local version?

Thanks.

@ccordoba12
Copy link
Member

@dhendricks-medic, not yet. Spyder 3.1 will be available in January 17.

If you want to test the latest changes in Spyder, you can run

git clone https://github.com/spyder-ide/spyder.git
cd spyder
python bootstrap.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants