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

pep8 code analysis: trailing newline is added to source code before analyzing it #1123

Closed
spyder-bot opened this issue Feb 17, 2015 · 5 comments

Comments

@spyder-bot
Copy link
Collaborator

From contrebasse on 2012-07-25T06:46:01Z

Spyder Version: 2.1.9
Python Version: 2.7.3
Qt Version: 4.8.1, PyQt4 (API v2) 4.9.1 on Linux

What steps will reproduce the problem?

  1. Open a file with some python code with one trailing newline, like "pass\n"
    1. Activate pep8 analysis What is the expected output? What do you see instead? I expect to see no warning in the margin, while I get a warning : "W292 no newline at end of file".
      Calling the pep8 executable from the command line yields no warning.

Please provide any additional information below

. If I remove the trailing newline from the file, the warning disappears in spyder but I have a warning with pep8 on the command line : "test.py:1:5: W292 no newline at end of file"

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1123

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2012-07-28T09:58:35Z

FYI, there is no embedded pep8 in Spyder: Spyder is simply using the pep8 installed on your machine.

And I can't reproduce this behavior.
Is anyone else able to do so?

@spyder-bot
Copy link
Collaborator Author

From mfritzsc...@gmail.com on 2012-10-29T05:17:46Z

Similar problem here on a Gentoo linux box.

Spyder 2.1.11
Python 2.7.3

With a trailing newline I get a spyder-warning "W391 blank line at end of file", while running pep8 on console returns no messages.

Removing the newline gives no warning in spyder, but a pep8-warning on console "W292 no newline at end of file".

@spyder-bot
Copy link
Collaborator Author

From contrebasse on 2012-10-29T05:45:00Z

BTW, I have the problem in ArchLinux too (sorry, I don't have version numbers right now).

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2012-11-04T04:30:48Z

Status: Accepted
Labels: Cat-Editor

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2012-11-04T04:33:53Z

This issue was updated by revision 74afbd1ddfac .

As suggested by the new summary of this issue, this is not a conflict between
integrated pep8 and standalone pep8.

Summary: pep8 code analysis: trailing newline is added to source code before analyzing it
Status: Fixed

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

1 participant