Skip to content

Commit 44dfc89

Browse files
Several isort related fixed (after isort upgrade).
1 parent 4426e2d commit 44dfc89

File tree

12 files changed

+18
-14
lines changed

12 files changed

+18
-14
lines changed

examples/gevent-get-input.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
patches are applied.
55
"""
66
from gevent.monkey import patch_all
7+
78
from prompt_toolkit.eventloop.defaults import create_event_loop
89
from prompt_toolkit.shortcuts import PromptSession
910

examples/prompts/inputhook.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
`InputHookContext.input_is_ready()`. Another way is to check for
1212
`InputHookContext.fileno()` to be ready. In this example we do the latter.
1313
"""
14-
from pygments.lexers.python import PythonLexer
15-
1614
import gobject
1715
import gtk
16+
from pygments.lexers.python import PythonLexer
17+
1818
from prompt_toolkit.eventloop.defaults import create_event_loop
1919
from prompt_toolkit.lexers import PygmentsLexer
2020
from prompt_toolkit.patch_stdout import patch_stdout

prompt_toolkit/application/current.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
from prompt_toolkit.eventloop.dummy_contextvars import ContextVar # type: ignore
99

1010
if TYPE_CHECKING:
11-
from .application import Application
1211
from prompt_toolkit.input.defaults import Input
1312
from prompt_toolkit.output.defaults import Output
1413

14+
from .application import Application
15+
1516
__all__ = [
1617
"AppSession",
1718
"get_app_session",

prompt_toolkit/clipboard/pyperclip.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from typing import Optional
22

33
import pyperclip
4+
45
from prompt_toolkit.selection import SelectionType
56

67
from .base import Clipboard, ClipboardData

prompt_toolkit/eventloop/async_context_manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
@asynccontextmanager code, copied from Python 3.7's contextlib.
33
For usage in Python 3.6.
44
"""
5-
import _collections_abc
65
import abc
76
from functools import wraps
87

8+
import _collections_abc
9+
910
__all__ = ["asynccontextmanager"]
1011

1112

prompt_toolkit/filters/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ def has_focus(value: "FocusableElement") -> Condition:
5252
Enable when this buffer has the focus.
5353
"""
5454
from prompt_toolkit.buffer import Buffer
55-
from prompt_toolkit.layout.controls import UIControl
56-
from prompt_toolkit.layout.containers import to_container, Window, Container
5755
from prompt_toolkit.layout import walk
56+
from prompt_toolkit.layout.containers import Container, Window, to_container
57+
from prompt_toolkit.layout.controls import UIControl
5858

5959
if isinstance(value, str):
6060

prompt_toolkit/key_binding/bindings/completion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ def _display_completions_like_readline(
8787
This will ask for a confirmation if there are too many completions to fit
8888
on a single page and provide a paginator to walk through them.
8989
"""
90-
from prompt_toolkit.shortcuts.prompt import create_confirm_session
9190
from prompt_toolkit.formatted_text import to_formatted_text
91+
from prompt_toolkit.shortcuts.prompt import create_confirm_session
9292

9393
# Get terminal dimensions.
9494
term_size = app.output.get_size()

prompt_toolkit/key_binding/vi_state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
from prompt_toolkit.clipboard import ClipboardData
55

66
if TYPE_CHECKING:
7-
from .key_processor import KeyPressEvent
87
from .key_bindings.vi import TextObject
8+
from .key_processor import KeyPressEvent
99

1010
__all__ = [
1111
"InputMode",

prompt_toolkit/lexers/pygments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ def from_filename(
211211
Create a `Lexer` from a filename.
212212
"""
213213
# Inline imports: the Pygments dependency is optional!
214-
from pygments.util import ClassNotFound
215214
from pygments.lexers import get_lexer_for_filename
215+
from pygments.util import ClassNotFound
216216

217217
try:
218218
pygments_lexer = get_lexer_for_filename(filename)

prompt_toolkit/output/defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def create_output(
4848
if is_windows():
4949
from .conemu import ConEmuOutput
5050
from .win32 import Win32Output
51-
from .windows10 import is_win_vt100_enabled, Windows10_Output
51+
from .windows10 import Windows10_Output, is_win_vt100_enabled
5252

5353
if is_win_vt100_enabled():
5454
return cast(Output, Windows10_Output(stdout))

0 commit comments

Comments
 (0)