Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd540613

Browse files
committed
Apply black
1 parenta9b1324 commitd540613

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
classSupportsEventGeneration(Protocol):
4141
defsend(
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
classFullCurtsiesRepl(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-
ifself.matches_iter.completer
1806-
elseNone,
1804+
(
1805+
self.matches_iter.completer.format
1806+
ifself.matches_iter.completer
1807+
elseNone
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-
ifm!=current
79-
elsehighlight_color(m.ljust(max_match_width))
77+
(
78+
color(m.ljust(max_match_width))
79+
ifm!=current
80+
elsehighlight_color(m.ljust(max_match_width))
81+
)
8082
forminmatches[i :i+words_wide]
8183
)
8284
foriinrange(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
classPaster(Protocol):
40-
defpaste(self,s:str)->Tuple[str,Optional[str]]:
41-
...
40+
defpaste(self,s:str)->Tuple[str,Optional[str]]: ...
4241

4342

4443
classPastePinnwand:

‎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
defget_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
formodulein [original,processed]
22-
]
22+
)
2323

2424
ifnotorig:
2525
raiseValueError(

‎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
ifurwid.VERSION< (1,0,0)andhasattr(urwid,"TwistedEventLoop"):
100100

101101
classTwistedEventLoop(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)

[8]ページ先頭

©2009-2025 Movatter.jp