Skip to content

Commit 237cf46

Browse files
Sorting of imports (using isort -m 3 -tc).
1 parent f66f74e commit 237cf46

File tree

254 files changed

+1415
-571
lines changed

Some content is hidden

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

254 files changed

+1415
-571
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,17 @@ matrix:
1818

1919
install:
2020
- pip install . pytest coverage codecov flake8
21+
- if [ "$TRAVIS_PYTHON_VERSION" != "2.6" ]; then pip install isort; fi
2122
- pip list
2223

2324
script:
2425
- echo "$TRAVIS_PYTHON_VERSION"
2526
- if [ "$TRAVIS_PYTHON_VERSION" != "2.6" ]; then flake8 prompt_toolkit; fi
2627
- coverage run -m pytest
2728

29+
# Check wheather the imports were sorted correctly.
30+
# When this fails, please run ./tools/sort-imports.sh
31+
- if [ "$TRAVIS_PYTHON_VERSION" != "2.6" ]; then isort -c -m 3 -tc -rc prompt_toolkit; fi
32+
2833
after_success:
2934
- codecov

docs/conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15-
import sys
1615
import os
16+
import sys
1717

1818
# If extensions (or modules to document with autodoc) are in another directory,
1919
# add these directories to sys.path here. If the directory is relative to the
@@ -99,7 +99,6 @@
9999
# The theme to use for HTML and HTML Help pages. See the documentation for
100100
# a list of builtin themes.
101101

102-
import os
103102
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
104103

105104
if on_rtd:

examples/dialogs/button_dialog.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Example of button dialog window.
44
"""
55
from __future__ import unicode_literals
6+
67
from prompt_toolkit.shortcuts import button_dialog
78

89

examples/dialogs/input_dialog.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Example of an input box dialog.
44
"""
55
from __future__ import unicode_literals
6+
67
from prompt_toolkit.shortcuts import input_dialog
78

89

examples/dialogs/messagebox.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Example of a message box window.
44
"""
55
from __future__ import unicode_literals
6+
67
from prompt_toolkit.shortcuts import message_dialog
78

89

examples/dialogs/password_dialog.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Example of an password input dialog.
44
"""
55
from __future__ import unicode_literals
6+
67
from prompt_toolkit.shortcuts import input_dialog
78

89

examples/dialogs/progress_dialog.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
Example of a progress bar dialog.
44
"""
55
from __future__ import unicode_literals
6-
from prompt_toolkit.shortcuts import progress_dialog
7-
import time
6+
87
import os
8+
import time
9+
10+
from prompt_toolkit.shortcuts import progress_dialog
911

1012

1113
def worker(set_percentage, log_text):

examples/dialogs/radio_dialog.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Example of a radio list box dialog.
44
"""
55
from __future__ import unicode_literals
6+
67
from prompt_toolkit.formatted_text import HTML
78
from prompt_toolkit.shortcuts import radiolist_dialog
89

examples/dialogs/styled_messagebox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
text.
99
"""
1010
from __future__ import unicode_literals
11+
1112
from prompt_toolkit.formatted_text import HTML
1213
from prompt_toolkit.shortcuts import message_dialog
1314
from prompt_toolkit.styles import Style
1415

15-
1616
# Custom color scheme.
1717
example_style = Style.from_dict({
1818
'dialog': 'bg:#88ff88',

examples/dialogs/yes_no_dialog.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Example of confirmation (yes/no) dialog window.
44
"""
55
from __future__ import unicode_literals
6+
67
from prompt_toolkit.shortcuts import yes_no_dialog
78

89

0 commit comments

Comments
 (0)