Skip to content

Commit 313dd70

Browse files
Use lists instead of tuples for __all__ + no star-imports.
1 parent 0a64979 commit 313dd70

File tree

120 files changed

+490
-245
lines changed

Some content is hidden

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

120 files changed

+490
-245
lines changed

prompt_toolkit/__init__.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,23 @@
1414
`prompt_toolkit.shortcuts.prompt`.
1515
"""
1616
from .application import Application
17-
from .shortcuts import *
17+
from .shortcuts import Prompt, prompt, print_formatted_text
1818
from .formatted_text import HTML, ANSI
1919

2020

2121
# Don't forget to update in `docs/conf.py`!
2222
__version__ = '2.0.0'
23+
24+
25+
__all__ = [
26+
# Application.
27+
'Application',
28+
29+
# Shortcuts.
30+
'prompt',
31+
'Prompt',
32+
'print_formatted_text',
33+
34+
# Formatted text.
35+
'HTML', 'ANSI',
36+
]

prompt_toolkit/application/__init__.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,20 @@
33
from .current import get_app, set_app, NoRunningApplicationError
44
from .dummy import DummyApplication
55
from .run_in_terminal import run_in_terminal, run_coroutine_in_terminal
6+
7+
__all__ = [
8+
# Application.
9+
'Application',
10+
11+
# Current.
12+
'get_app',
13+
'set_app',
14+
'NoRunningApplicationError',
15+
16+
# Dummy.
17+
'DummyApplication',
18+
19+
# Run_in_terminal
20+
'run_coroutine_in_terminal',
21+
'run_in_terminal',
22+
]

prompt_toolkit/application/application.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
import sys
3737
import time
3838

39-
__all__ = (
39+
__all__ = [
4040
'Application',
41-
)
41+
]
4242

4343

4444
class Application(object):

prompt_toolkit/application/current.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
from prompt_toolkit.eventloop.context import TaskLocal, TaskLocalNotSetError
33
from contextlib import contextmanager
44

5-
__all__ = (
5+
__all__ = [
66
'get_app',
77
'set_app',
88
'NoRunningApplicationError',
9-
)
9+
]
1010

1111

1212
_current_app = TaskLocal()

prompt_toolkit/application/dummy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
from prompt_toolkit.input import DummyInput
44
from prompt_toolkit.output import DummyOutput
55

6-
__all__ = (
6+
__all__ = [
77
'DummyApplication',
8-
)
8+
]
99

1010

1111
class DummyApplication(Application):

prompt_toolkit/application/run_in_terminal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
from prompt_toolkit.eventloop import get_event_loop, ensure_future, Return, run_in_executor, From, Future
66
from .current import get_app
77

8-
__all__ = (
8+
__all__ = [
99
'run_in_terminal',
1010
'run_coroutine_in_terminal',
11-
)
11+
]
1212

1313

1414
def run_in_terminal(func, render_cli_done=False, in_executor=False):

prompt_toolkit/auto_suggest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
from .eventloop import Future, run_in_executor
1818
from .filters import to_filter
1919

20-
__all__ = (
20+
__all__ = [
2121
'Suggestion',
2222
'AutoSuggest',
2323
'ThreadedAutoSuggest',
2424
'DummyAutoSuggest',
2525
'AutoSuggestFromHistory',
2626
'ConditionalAutoSuggest',
2727
'DynamicAutoSuggest',
28-
)
28+
]
2929

3030

3131
class Suggestion(object):

prompt_toolkit/buffer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
import subprocess
3131
import tempfile
3232

33-
__all__ = (
33+
__all__ = [
3434
'EditReadOnlyBuffer',
3535
'Buffer',
3636
'indent',
3737
'unindent',
3838
'reshape_text',
39-
)
39+
]
4040

4141

4242
class EditReadOnlyBuffer(Exception):

prompt_toolkit/cache.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
from collections import deque
33
from functools import wraps
44

5-
__all__ = (
5+
__all__ = [
66
'SimpleCache',
77
'FastDictCache',
88
'memoized',
9-
)
9+
]
1010

1111

1212
class SimpleCache(object):

prompt_toolkit/clipboard/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99
from prompt_toolkit.selection import SelectionType
1010

11-
__all__ = (
11+
__all__ = [
1212
'Clipboard',
1313
'ClipboardData',
1414
'DummyClipboard',
1515
'DynamicClipboard',
16-
)
16+
]
1717

1818

1919
class ClipboardData(object):

0 commit comments

Comments
 (0)