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

Block comment added with "Add block comment" does not confirm to PEP8 #4073

Closed
sphh opened this issue Jan 30, 2017 · 2 comments
Closed

Block comment added with "Add block comment" does not confirm to PEP8 #4073

sphh opened this issue Jan 30, 2017 · 2 comments

Comments

@sphh
Copy link
Contributor

sphh commented Jan 30, 2017

The block comment inserted by Edit > Add block comment (Ctrl+4) does not confirm to PEP8 style.

What steps will reproduce the problem?

  1. Enable "Real-time code style analysis" in Preferences > Editor > Code Introspection/Analysis.
  2. Insert a block comment either with menu item Edit > Add block comment or Ctrl+4.

What is the expected output? What do you see instead?

I would expect a block comment inserted which confirms to PEP8, such as

# =============================================================================
# 
# =============================================================================

but I get a block comment

and a PEP8 error "E265 block comment should start with '# '"

#==============================================================================
# 
#==============================================================================

Please see the missing space after the comment character.

Please provide any additional information below

When adding the missing space, one equal sign has to be removed to keep the maximum number of characters in the line constant. (Just to state the obvious.)

Versions and main components

  • Spyder Version: 3.1.2
  • Python Version: 3.5.2
  • Operating system: Linux Mint 18.1

Dependencies

jedi >=0.8.1 : 0.9.0 (OK)
matplotlib >=1.0 : 1.5.1 (OK)
nbconvert >=4.0 : 5.1.1 (OK)
numpy >=1.7 : 1.11.0 (OK)
pandas >=0.13.1 : 0.17.1 (OK)
pep8 >=0.6 : 1.7.0 (OK)
psutil >=0.3 : 5.0.1 (OK)
pyflakes >=0.6.0 : 1.5.0 (OK)
pygments >=2.0 : 2.2.0 (OK)
pylint >=0.25 : 1.6.5 (OK)
qtconsole >=4.2.0: 4.2.1 (OK)
rope >=0.9.4 : 0.9.4-1 (OK)
sphinx >=0.6.6 : 1.5.2 (OK)
sympy >=0.7.3 : 0.7.6.1 (OK)

@nbonacchi
Copy link

nbonacchi commented Jan 30, 2017

Yup, its a very annoying bug.
As far as I can tell It's always been there.

EDIT:
Which reminded me of this bug #4075 that I just submitted.

@ccordoba12
Copy link
Member

Thanks for reporting. This is a duplicate of issue #1785.

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