Skip to content

Commit ccdb248

Browse files
authored
Merge pull request #4235 from asottile/reorder_python_imports
Apply reorder-python-imports to all files
2 parents f6dfca7 + 2368fbb commit ccdb248

File tree

109 files changed

+720
-415
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+720
-415
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ repos:
2323
language_version: python3
2424
- id: flake8
2525
language_version: python3
26+
- repo: https://github.com/asottile/reorder_python_imports
27+
rev: v1.3.2
28+
hooks:
29+
- id: reorder-python-imports
30+
args: ['--application-directories=.:src']
2631
- repo: https://github.com/asottile/pyupgrade
2732
rev: v1.8.0
2833
hooks:

bench/bench_argcomplete.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# 2.7.5 3.3.2
33
# FilesCompleter 75.1109 69.2116
44
# FastFilesCompleter 0.7383 1.0760
5-
65
import timeit
76

87
imports = [

bench/skip.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from six.moves import range
2+
23
import pytest
34

45

doc/en/_themes/flask_theme_support.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
# flasky extensions. flasky pygments style based on tango style
22
from pygments.style import Style
3-
from pygments.token import (
4-
Keyword,
5-
Name,
6-
Comment,
7-
String,
8-
Error,
9-
Number,
10-
Operator,
11-
Generic,
12-
Whitespace,
13-
Punctuation,
14-
Other,
15-
Literal,
16-
)
3+
from pygments.token import Comment
4+
from pygments.token import Error
5+
from pygments.token import Generic
6+
from pygments.token import Keyword
7+
from pygments.token import Literal
8+
from pygments.token import Name
9+
from pygments.token import Number
10+
from pygments.token import Operator
11+
from pygments.token import Other
12+
from pygments.token import Punctuation
13+
from pygments.token import String
14+
from pygments.token import Whitespace
1715

1816

1917
class FlaskyStyle(Style):

doc/en/conf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,15 @@
1010
#
1111
# All configuration values have a default; values that are commented out
1212
# serve to show the default.
13-
1413
# The version info for the project you're documenting, acts as replacement for
1514
# |version| and |release|, also used in various other places throughout the
1615
# built documents.
1716
#
1817
# The full version, including alpha/beta/rc tags.
1918
# The short X.Y version.
20-
19+
import datetime
2120
import os
2221
import sys
23-
import datetime
2422

2523
from _pytest import __version__ as version
2624

doc/en/example/assertion/failure_demo.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
from pytest import raises
2-
import _pytest._code
31
import six
42

3+
import _pytest._code
4+
from pytest import raises
5+
56

67
def otherfunc(a, b):
78
assert a == b

doc/en/example/assertion/global_testmodule_config/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import pytest
21
import py
32

3+
import pytest
4+
45
mydir = py.path.local(__file__).dirpath()
56

67

doc/en/example/multipython.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import textwrap
66

77
import py
8+
89
import pytest
910

1011
pythonlist = ["python2.7", "python3.4", "python3.5"]

doc/en/example/nonpython/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# content of conftest.py
2-
32
import pytest
43

54

doc/en/example/py2py3/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import sys
2+
23
import pytest
34

45
py3 = sys.version_info[0] >= 3

0 commit comments

Comments
 (0)