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

when __all__ var is defined over multiple lines, import annotations moved incorrectly #529

Closed
parthpromax opened this issue Mar 28, 2020 · 1 comment
Assignees
Labels
Milestone

Comments

@parthpromax
Copy link


Python Code

__all__ = [
	'temp1',
	'temp2'
]

temp1 = 1
temp2 = 2

import time 

print(time.time())

Command Line and Configuration

.pep8, setup.cfg, ...

[pep8]

Command Line

$ autopep8 

Your Environment

  • Python version: 2.7.16
  • autopep8 version: 1.5 (pycodestyle: 2.5.0)
  • Platform: macOSX

autopep8 output

__all__ = [
    import time
    'temp1',
    'temp2'
]

temp1 = 1
temp2 = 2


print(time.time())
@parthpromax parthpromax changed the title when __all__ var is defined using multiline, import annotations moved incorrectly when __all__ var is defined over multiple lines, import annotations moved incorrectly Mar 28, 2020
@hhatto hhatto added the bug label Mar 29, 2020
hhatto added a commit that referenced this issue Apr 1, 2020
@hhatto hhatto self-assigned this Apr 1, 2020
@hhatto hhatto added this to the 1.5.1 milestone Apr 2, 2020
@hhatto
Copy link
Owner

hhatto commented Apr 2, 2020

Thanks for reporting.

fix in 3a89645.

We will be releasing version 1.5.1 with this fix this week.

@hhatto hhatto closed this as completed Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants