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

Comment/Uncomment should follow PEP8 #3162

Closed
endolith opened this issue May 12, 2016 · 1 comment
Closed

Comment/Uncomment should follow PEP8 #3162

endolith opened this issue May 12, 2016 · 1 comment

Comments

@endolith
Copy link

endolith commented May 12, 2016

Description of your problem

What steps will reproduce the problem?

  1. Write some code
  2. Highlight it
  3. Press Ctrl+1 or whatever the Comment/Uncomment key is

What is the expected output? What do you see instead?
It puts a hash before it and no space:

#def test():
#    pass

This then triggers the pyflakes PEP8 checker E265 block comment should start with '# '.

It should add a space too:

# def test():
#     pass

Versions and main components

  • Spyder Version: 2.3.8
  • Python Version: 2.7.11
  • Operating system: Windows 7

Dependencies

Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:

IPython >=1.0 : 4.2.0 (OK)
jedi >=0.8.1;<0.9.0: 0.9.0 (NOK)
matplotlib >=1.0 : 1.5.1 (OK)
pandas >=0.13.1 : 0.18.0 (OK)
pep8 >=0.6 : 1.7.0 (OK)
pyflakes >=0.5.0 : 1.1.0 (OK)
pygments >=1.6 : 2.1.1 (OK)
pylint >=0.25 : 1.5.4 (OK)
qtconsole >=4.0 : 4.2.1 (OK)
rope >=0.9.2 : 0.9.4 (OK)
sphinx >=0.6.6 : 1.3.5 (OK)
sympy >=0.7.3 : 1.0 (OK)
zmq >=2.1.11 : 15.2.0 (OK)

@Nodd
Copy link
Contributor

Nodd commented May 12, 2016

I agree that it should follow pep8 but it can be problematic in some cases when uncommenting. This problem has already been reported in #1785, please have a look at the discussion over there.

I'm closing this one as a duplicate.

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

2 participants