@@ -42,6 +42,7 @@ def __init__(
4242 logger .debug ("-------initializing Window object %r------" % self )
4343 if out_stream is None :
4444 out_stream = sys .__stdout__
45+ assert out_stream is not None
4546 self .t = blessed .Terminal (stream = out_stream , force_styling = True )
4647 self .out_stream = out_stream
4748 self .hide_cursor = hide_cursor
@@ -241,10 +242,12 @@ class CursorAwareWindow(BaseWindow, ContextManager["CursorAwareWindow"]):
241242 Only use the render_to_terminal interface for moving the cursor.
242243 """
243244
245+ in_stream : TextIO
246+
244247 def __init__ (
245248 self ,
246- out_stream : Optional [IO ] = None ,
247- in_stream : Optional [IO ] = None ,
249+ out_stream : Optional [TextIO ] = None ,
250+ in_stream : Optional [TextIO ] = None ,
248251 keep_last_line : bool = False ,
249252 hide_cursor : bool = True ,
250253 extra_bytes_callback : Optional [Callable [[bytes ], None ]] = None ,
@@ -264,6 +267,7 @@ def __init__(
264267 super ().__init__ (out_stream = out_stream , hide_cursor = hide_cursor )
265268 if in_stream is None :
266269 in_stream = sys .__stdin__
270+ assert in_stream is not None
267271 self .in_stream = in_stream
268272 # whether we can use blessed to handle some operations
269273 self ._use_blessed = (
0 commit comments