Skip to content

Commit 80bd3e0

Browse files
committed
Make window optional for tests
Where required, assert that window is not None.
1 parent 0d16fe6 commit 80bd3e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bpython/curtsiesfrontend/repl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ class BaseRepl(Repl):
326326
def __init__(
327327
self,
328328
config: Config,
329-
window: BaseWindow,
329+
window: Optional[BaseWindow] = None,
330330
locals_: Optional[Dict[str, Any]] = None,
331331
banner: Optional[str] = None,
332332
interp: Optional[Interp] = None,
@@ -2078,6 +2078,7 @@ def focus_on_subprocess(self, args):
20782078
try:
20792079
signal.signal(signal.SIGWINCH, self.orig_sigwinch_handler)
20802080
with Termmode(self.orig_stdin, self.orig_tcattrs):
2081+
assert self.window is not None
20812082
terminal = self.window.t
20822083
with terminal.fullscreen():
20832084
sys.__stdout__.write(terminal.save)

0 commit comments

Comments
 (0)