-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Apply reorder-python-imports to all files #4235
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| from six.moves import range | ||
|
|
||
| import pytest | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| import pytest | ||
| import py | ||
|
|
||
| import pytest | ||
|
|
||
| mydir = py.path.local(__file__).dirpath() | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |
| import textwrap | ||
|
|
||
| import py | ||
|
|
||
| import pytest | ||
|
|
||
| pythonlist = ["python2.7", "python3.4", "python3.5"] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| # content of conftest.py | ||
|
|
||
| import pytest | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| import sys | ||
|
|
||
| import pytest | ||
|
|
||
| py3 = sys.version_info[0] >= 3 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| import json | ||
|
|
||
| import py | ||
| import requests | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| import os | ||
|
|
||
| from setuptools import setup | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,9 +53,12 @@ | |
| which should throw a KeyError: 'COMPLINE' (which is properly set by the | ||
| global argcomplete script). | ||
| """ | ||
| from __future__ import absolute_import, division, print_function | ||
| import sys | ||
| from __future__ import absolute_import | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @asottile can you change the tool so for future imports it does one line?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nope, not configurable intentionally
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @asottile not asking for a configuration there ^^ |
||
| from __future__ import division | ||
| from __future__ import print_function | ||
|
|
||
| import os | ||
| import sys | ||
| from glob import glob | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,14 @@ | ||
| """ python inspection/code generation API """ | ||
| from __future__ import absolute_import, division, print_function | ||
| from __future__ import absolute_import | ||
| from __future__ import division | ||
| from __future__ import print_function | ||
|
|
||
| from .code import Code # noqa | ||
| from .code import ExceptionInfo # noqa | ||
| from .code import Frame # noqa | ||
| from .code import Traceback # noqa | ||
| from .code import filter_traceback # noqa | ||
| from .code import Frame # noqa | ||
| from .code import getrawcode # noqa | ||
| from .source import Source # noqa | ||
| from .code import Traceback # noqa | ||
| from .source import compile_ as compile # noqa | ||
| from .source import getfslineno # noqa | ||
| from .source import Source # noqa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should probably also set
--add-import 'from __future__ import absolute_import'and/or the others we want to enforce on all files