Skip to content

Commit 568de64

Browse files
Black 23.1.0
1 parent 4e22156 commit 568de64

Some content is hidden

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

46 files changed

+5
-97
lines changed

examples/progress-bar/nested-progress-bars.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ def main():
1313
title=HTML('<b fg="#aa00ff">Nested progress bars</b>'),
1414
bottom_toolbar=HTML(" <b>[Control-L]</b> clear <b>[Control-C]</b> abort"),
1515
) as pb:
16-
1716
for i in pb(range(6), label="Main task"):
1817
for j in pb(range(200), label=f"Subtask <{i + 1}>", remove_when_done=True):
1918
time.sleep(0.01)

examples/progress-bar/styled-2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def main():
4141
formatters=custom_formatters,
4242
style=style,
4343
) as pb:
44-
4544
for i in pb(range(20), label="Downloading..."):
4645
time.sleep(1)
4746

src/prompt_toolkit/application/application.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ def __init__(
226226
input: Optional[Input] = None,
227227
output: Optional[Output] = None,
228228
) -> None:
229-
230229
# If `enable_page_navigation_bindings` is not specified, enable it in
231230
# case of full screen applications only. This can be overridden by the user.
232231
if enable_page_navigation_bindings is None:
@@ -736,7 +735,6 @@ def flush_input() -> None:
736735
with self.input.raw_mode(), self.input.attach(
737736
read_from_input
738737
), attach_winch_signal_handler(self._on_resize):
739-
740738
# Draw UI.
741739
self._request_absolute_cursor_position()
742740
self._redraw()

src/prompt_toolkit/application/current.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ class AppSession:
4444
def __init__(
4545
self, input: Optional["Input"] = None, output: Optional["Output"] = None
4646
) -> None:
47-
4847
self._input = input
4948
self._output = output
5049

src/prompt_toolkit/auto_suggest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ class ConditionalAutoSuggest(AutoSuggest):
151151
"""
152152

153153
def __init__(self, auto_suggest: AutoSuggest, filter: Union[bool, Filter]) -> None:
154-
155154
self.auto_suggest = auto_suggest
156155
self.filter = to_filter(filter)
157156

src/prompt_toolkit/buffer.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ def __init__(
8484
completions: Optional[List["Completion"]] = None,
8585
complete_index: Optional[int] = None,
8686
) -> None:
87-
8887
#: Document as it was when the completion started.
8988
self.original_document = original_document
9089

@@ -156,7 +155,6 @@ class YankNthArgState:
156155
def __init__(
157156
self, history_position: int = 0, n: int = -1, previous_inserted_word: str = ""
158157
) -> None:
159-
160158
self.history_position = history_position
161159
self.previous_inserted_word = previous_inserted_word
162160
self.n = n
@@ -253,7 +251,6 @@ def __init__(
253251
on_completions_changed: Optional[BufferEventHandler] = None,
254252
on_suggestion_set: Optional[BufferEventHandler] = None,
255253
):
256-
257254
# Accept both filters and booleans as input.
258255
enable_history_search = to_filter(enable_history_search)
259256
complete_while_typing = to_filter(complete_while_typing)
@@ -1720,7 +1717,6 @@ async def async_completer(
17201717
insert_common_part: bool = False,
17211718
complete_event: Optional[CompleteEvent] = None,
17221719
) -> None:
1723-
17241720
document = self.document
17251721
complete_event = complete_event or CompleteEvent(text_inserted=True)
17261722

src/prompt_toolkit/clipboard/base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class ClipboardData:
2525
def __init__(
2626
self, text: str = "", type: SelectionType = SelectionType.CHARACTERS
2727
) -> None:
28-
2928
self.text = text
3029
self.type = type
3130

src/prompt_toolkit/clipboard/in_memory.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class InMemoryClipboard(Clipboard):
1919
def __init__(
2020
self, data: Optional[ClipboardData] = None, max_size: int = 60
2121
) -> None:
22-
2322
assert max_size >= 1
2423

2524
self.max_size = max_size

src/prompt_toolkit/completion/base.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ def __init__(
4646
style: str = "",
4747
selected_style: str = "",
4848
) -> None:
49-
5049
from prompt_toolkit.formatted_text import to_formatted_text
5150

5251
self.text = text
@@ -354,7 +353,6 @@ def get_completions(
354353
async def get_completions_async(
355354
self, document: Document, complete_event: CompleteEvent
356355
) -> AsyncGenerator[Completion, None]:
357-
358356
# Get all completions in a non-blocking way.
359357
if self.filter():
360358
async with aclosing(
@@ -382,7 +380,6 @@ def get_completions(
382380
async def get_completions_async(
383381
self, document: Document, complete_event: CompleteEvent
384382
) -> AsyncGenerator[Completion, None]:
385-
386383
# Get all completions from the other completers in a non-blocking way.
387384
for completer in self.completers:
388385
async with aclosing(
@@ -416,6 +413,7 @@ def get_common_complete_suffix(
416413
"""
417414
Return the common prefix for all completions.
418415
"""
416+
419417
# Take only completions that don't change the text before the cursor.
420418
def doesnt_change_before_cursor(completion: Completion) -> bool:
421419
end = completion.text[: -completion.start_position]

src/prompt_toolkit/completion/filesystem.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def __init__(
3030
min_input_len: int = 0,
3131
expanduser: bool = False,
3232
) -> None:
33-
3433
self.only_directories = only_directories
3534
self.get_paths = get_paths or (lambda: ["."])
3635
self.file_filter = file_filter or (lambda _: True)

0 commit comments

Comments
 (0)