Skip to content

Commit 06d255a

Browse files
committed
Reformat via black
1 parent 9861781 commit 06d255a

File tree

9 files changed

+19
-46
lines changed

9 files changed

+19
-46
lines changed

bpython/args.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ def error(self, msg):
5656

5757
def version_banner(base="bpython") -> str:
5858
return _("{} version {} on top of Python {} {}").format(
59-
base,
60-
__version__,
61-
sys.version.split()[0],
62-
sys.executable,
59+
base, __version__, sys.version.split()[0], sys.executable,
6360
)
6461

6562

@@ -140,9 +137,7 @@ def callback(group):
140137
help=_("Set log level for logging"),
141138
)
142139
parser.add_argument(
143-
"--log-output",
144-
"-L",
145-
help=_("Log output file"),
140+
"--log-output", "-L", help=_("Log output file"),
146141
)
147142

148143
if extras is not None:

bpython/autocomplete.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ def method_match_fuzzy(word, size, text) -> Union[Match, None]:
208208
class BaseCompletionType:
209209
"""Describes different completion types"""
210210

211-
def __init__(self, shown_before_tab: bool=True, mode=AutocompleteModes.SIMPLE) -> None:
211+
def __init__(
212+
self, shown_before_tab: bool = True, mode=AutocompleteModes.SIMPLE
213+
) -> None:
212214
self._shown_before_tab = shown_before_tab
213215
self.method_match = MODES_MAP[mode]
214216

@@ -622,8 +624,7 @@ def matches(self, cursor_offset, line, **kwargs) -> Union[Dict, None]:
622624

623625
if "\n" in current_block:
624626
assert cursor_offset <= len(line), "{!r} {!r}".format(
625-
cursor_offset,
626-
line,
627+
cursor_offset, line,
627628
)
628629
results = super().matches(cursor_offset, line, history=history)
629630
return results

bpython/config.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,8 @@ class Config:
187187
"up_one_line": "C-p",
188188
"yank_from_buffer": "C-y",
189189
},
190-
"cli": {
191-
"suggestion_width": 0.8,
192-
"trim_prompts": False,
193-
},
194-
"curtsies": {
195-
"list_above": False,
196-
"right_arrow_completion": True,
197-
},
190+
"cli": {"suggestion_width": 0.8, "trim_prompts": False,},
191+
"curtsies": {"list_above": False, "right_arrow_completion": True,},
198192
}
199193

200194
def __init__(self, config_path: Path) -> None:

bpython/curtsies.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,14 @@ def __init__(self, config, locals_, banner, interp=None) -> None:
3535
self._request_refresh_callback = self.input_generator.event_trigger(
3636
events.RefreshRequestEvent
3737
)
38-
self._schedule_refresh_callback = (
39-
self.input_generator.scheduled_event_trigger(
40-
events.ScheduledRefreshRequestEvent
41-
)
38+
self._schedule_refresh_callback = self.input_generator.scheduled_event_trigger(
39+
events.ScheduledRefreshRequestEvent
4240
)
43-
self._request_reload_callback = (
44-
self.input_generator.threadsafe_event_trigger(events.ReloadEvent)
41+
self._request_reload_callback = self.input_generator.threadsafe_event_trigger(
42+
events.ReloadEvent
4543
)
46-
self._interrupting_refresh_callback = (
47-
self.input_generator.threadsafe_event_trigger(lambda: None)
44+
self._interrupting_refresh_callback = self.input_generator.threadsafe_event_trigger(
45+
lambda: None
4846
)
4947
self._request_undo_callback = self.input_generator.event_trigger(
5048
events.UndoEvent

bpython/curtsiesfrontend/repl.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -307,12 +307,7 @@ class BaseRepl(Repl):
307307
"""
308308

309309
def __init__(
310-
self,
311-
config,
312-
locals_=None,
313-
banner=None,
314-
interp=None,
315-
orig_tcattrs=None,
310+
self, config, locals_=None, banner=None, interp=None, orig_tcattrs=None,
316311
):
317312
"""
318313
locals_ is a mapping of locals to pass into the interpreter

bpython/repl.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,7 @@ def __init__(self, interp, config):
445445
self.paster = PasteHelper(self.config.pastebin_helper)
446446
else:
447447
self.paster = PastePinnwand(
448-
self.config.pastebin_url,
449-
self.config.pastebin_expiry,
448+
self.config.pastebin_url, self.config.pastebin_expiry,
450449
)
451450

452451
@property

bpython/test/test_autocomplete.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,7 @@ def test_custom_get_attribute_not_invoked(self):
257257
def test_slots_not_crash(self):
258258
com = autocomplete.AttrCompletion()
259259
self.assertSetEqual(
260-
com.matches(2, "A.", locals_={"A": Slots}),
261-
{"A.b", "A.a"},
260+
com.matches(2, "A.", locals_={"A": Slots}), {"A.b", "A.a"},
262261
)
263262

264263

bpython/test/test_crashers.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,7 @@ def processExited(self, reason):
100100
str(TEST_CONFIG),
101101
"-q", # prevents version greeting
102102
),
103-
env={
104-
"TERM": "vt100",
105-
"LANG": os.environ.get("LANG", "C.UTF-8"),
106-
},
103+
env={"TERM": "vt100", "LANG": os.environ.get("LANG", "C.UTF-8"),},
107104
usePTY=(master, slave, os.ttyname(slave)),
108105
)
109106
return result

bpython/urwid.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,12 +1143,7 @@ def options_callback(group):
11431143

11441144
# TODO: maybe support displays other than raw_display?
11451145
config, options, exec_args = bpargs.parse(
1146-
args,
1147-
(
1148-
"Urwid options",
1149-
None,
1150-
options_callback,
1151-
),
1146+
args, ("Urwid options", None, options_callback,),
11521147
)
11531148

11541149
if options.help_reactors:

0 commit comments

Comments
 (0)