Skip to content

Commit d540613

Browse files
committed
Apply black
1 parent a9b1324 commit d540613

File tree

6 files changed

+19
-20
lines changed

6 files changed

+19
-20
lines changed

bpython/curtsies.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,11 @@
4040
class SupportsEventGeneration(Protocol):
4141
def send(
4242
self, timeout: Optional[float]
43-
) -> Union[str, curtsies.events.Event, None]:
44-
...
43+
) -> Union[str, curtsies.events.Event, None]: ...
4544

46-
def __iter__(self) -> "SupportsEventGeneration":
47-
...
45+
def __iter__(self) -> "SupportsEventGeneration": ...
4846

49-
def __next__(self) -> Union[str, curtsies.events.Event, None]:
50-
...
47+
def __next__(self) -> Union[str, curtsies.events.Event, None]: ...
5148

5249

5350
class FullCurtsiesRepl(BaseRepl):
@@ -69,9 +66,9 @@ def __init__(
6966
extra_bytes_callback=self.input_generator.unget_bytes,
7067
)
7168

72-
self._request_refresh_callback: Callable[
73-
[], None
74-
] = self.input_generator.event_trigger(events.RefreshRequestEvent)
69+
self._request_refresh_callback: Callable[[], None] = (
70+
self.input_generator.event_trigger(events.RefreshRequestEvent)
71+
)
7572
self._schedule_refresh_callback = (
7673
self.input_generator.scheduled_event_trigger(
7774
events.ScheduledRefreshRequestEvent

bpython/curtsiesfrontend/repl.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,9 +1801,11 @@ def move_screen_up(current_line_start_row):
18011801
self.current_match,
18021802
self.docstring,
18031803
self.config,
1804-
self.matches_iter.completer.format
1805-
if self.matches_iter.completer
1806-
else None,
1804+
(
1805+
self.matches_iter.completer.format
1806+
if self.matches_iter.completer
1807+
else None
1808+
),
18071809
)
18081810

18091811
if (

bpython/curtsiesfrontend/replpainter.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,11 @@ def matches_lines(rows, columns, matches, current, config, match_format):
7474

7575
result = [
7676
fmtstr(" ").join(
77-
color(m.ljust(max_match_width))
78-
if m != current
79-
else highlight_color(m.ljust(max_match_width))
77+
(
78+
color(m.ljust(max_match_width))
79+
if m != current
80+
else highlight_color(m.ljust(max_match_width))
81+
)
8082
for m in matches[i : i + words_wide]
8183
)
8284
for i in range(0, len(matches), words_wide)

bpython/paste.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ class PasteFailed(Exception):
3737

3838

3939
class Paster(Protocol):
40-
def paste(self, s: str) -> Tuple[str, Optional[str]]:
41-
...
40+
def paste(self, s: str) -> Tuple[str, Optional[str]]: ...
4241

4342

4443
class PastePinnwand:

bpython/test/test_preprocess.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616

1717
def get_fodder_source(test_name):
1818
pattern = rf"#StartTest-{test_name}\n(.*?)#EndTest"
19-
orig, xformed = [
19+
orig, xformed = (
2020
re.search(pattern, inspect.getsource(module), re.DOTALL)
2121
for module in [original, processed]
22-
]
22+
)
2323

2424
if not orig:
2525
raise ValueError(

bpython/urwid.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ def buildProtocol(self, addr):
9999
if urwid.VERSION < (1, 0, 0) and hasattr(urwid, "TwistedEventLoop"):
100100

101101
class TwistedEventLoop(urwid.TwistedEventLoop):
102-
103102
"""TwistedEventLoop modified to properly stop the reactor.
104103
105104
urwid 0.9.9 and 0.9.9.1 crash the reactor on ExitMainLoop instead

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy