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

Removing import hoisting behaviour #13

Open
asottile opened this issue May 10, 2014 · 2 comments
Open

Removing import hoisting behaviour #13

asottile opened this issue May 10, 2014 · 2 comments

Comments

@asottile
Copy link
Collaborator

Covered by Tests/Cheps.py

@asottile
Copy link
Collaborator Author

I took a crack at this. It's a little more difficult than what it says on the tin for the following reason:

"module" level imports get stuck into the respond method which is broken imo. Need to add some code to special case module level imports. Also the import code is unnecessarily complicated in the current state. Might even be able to leverage ast instead of the manual parsing it currently does.

@asottile
Copy link
Collaborator Author

asottile commented Mar 6, 2016

The logic has gotten much simpler (leveraging ast):

def _add_import_statement(self, imp_statement, line_col):

This is however still an issue

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