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

Keep spaces before inline comments #129

Closed
Bengt opened this issue Feb 23, 2014 · 2 comments
Closed

Keep spaces before inline comments #129

Bengt opened this issue Feb 23, 2014 · 2 comments

Comments

@Bengt
Copy link

Bengt commented Feb 23, 2014

isort currently collapses spaces separating inline comments from import statements into one space.

When I write this:

import a  # useful library

isort removes one of the spaces:

diff [...]

-import a  # useful library
+import a # useful library

According to pep8, [i]nline comments should be separated by at least two spaces from the statement.

I think, isort should keep double spaces if they exist, to keep code adhering to pep8 valid. Perhaps isort should also introduce double spaces, if there is only one, to make the resulting code adhere to pep8.

@timothycrosley
Copy link
Member

Fixed in just released hotfix release version 3.6.1 - thanks for pointing this out! I've made it always follow the pep8 two space specification - as it should.

~Tim

@Bengt
Copy link
Author

Bengt commented Feb 28, 2014

Works fine. Thanks for the fix.

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

No branches or pull requests

2 participants