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

relative import issue #105

Closed
graingert opened this issue Jan 30, 2014 · 5 comments
Closed

relative import issue #105

graingert opened this issue Jan 30, 2014 · 5 comments
Labels
bug Something isn't working

Comments

@graingert
Copy link
Member

isort caused a syntax error:

--- a/foo/foo/foo_foo/tests/foo_v0/test_jobs.py
+++ b/foo/foo/foo_foo/tests/foo_v0/test_jobs.py
@@ -6,9 +6,10 @@ from django.test.client import RequestFactory
 from mock import patch
 from model_mommy import mommy

-from ... import models, sproqet_api as sproq_api
-from ... fields.sproqet import SproqetCollection
-from ..utils import fake_spork_client, http_status_codes as status
+from ... import sproqet_api as sproq_api
+from ... import fields.sproqet, models, SproqetCollection
+from ..utils import http_status_codes as status
+from ..utils import fake_spork_client
 from ..utils.misc import SporkPatcherTestCaseMixin
 from .utils.constants import job_clone_uri_name, job_detail_uri_name
@timothycrosley
Copy link
Member

Glad you found and reported this issue, it's important to me that users feel comfortable that isort will never brake their code, so issues like this are an especially high priority. I'll try to get a hot-fix release out soon to address this.

Thanks!

~Timothy

@graingert
Copy link
Member Author

Perhaps refuse to execute on code with syntax errors and check the
resulting code for syntax errors (by pyc compiling the module)
On 30 Jan 2014 22:27, "Timothy Edmund Crosley" notifications@github.com
wrote:

Glad you found and reported this issue, it's important to me that users
feel comfortable that isort will never brake their code, so issues like
this are an especially high priority. I'll try to get a hot-fix release out
soon to address this.

Thanks!

~Timothy

Reply to this email directly or view it on GitHubhttps://github.com//issues/105#issuecomment-33741391
.

@timothycrosley
Copy link
Member

That sounds like a really good idea, as it would almost make running isort an atomic operation. I'll fix this issue separately, but I added #106 as a future enhancement to work on.

@timothycrosley
Copy link
Member

Fixed in hotfix release 3.3.1

Thanks!

~Timothy

@graingert
Copy link
Member Author

+:100:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants