@@ -210,8 +210,8 @@ def _build(
210
210
alt_lib_path : str | None ,
211
211
flush_errors : Callable [[str | None , list [str ], bool ], None ],
212
212
fscache : FileSystemCache | None ,
213
- stdout : TextIO ,
214
- stderr : TextIO ,
213
+ stdout : TextIO | None ,
214
+ stderr : TextIO | None ,
215
215
extra_plugins : Sequence [Plugin ],
216
216
) -> BuildResult :
217
217
if platform .python_implementation () == "CPython" :
@@ -398,7 +398,7 @@ def import_priority(imp: ImportBase, toplevel_priority: int) -> int:
398
398
399
399
400
400
def load_plugins_from_config (
401
- options : Options , errors : Errors , stdout : TextIO
401
+ options : Options , errors : Errors , stdout : TextIO | None
402
402
) -> tuple [list [Plugin ], dict [str , str ]]:
403
403
"""Load all configured plugins.
404
404
@@ -490,7 +490,7 @@ def plugin_error(message: str) -> NoReturn:
490
490
491
491
492
492
def load_plugins (
493
- options : Options , errors : Errors , stdout : TextIO , extra_plugins : Sequence [Plugin ]
493
+ options : Options , errors : Errors , stdout : TextIO | None , extra_plugins : Sequence [Plugin ]
494
494
) -> tuple [Plugin , dict [str , str ]]:
495
495
"""Load all configured plugins.
496
496
@@ -606,8 +606,8 @@ def __init__(
606
606
errors : Errors ,
607
607
flush_errors : Callable [[str | None , list [str ], bool ], None ],
608
608
fscache : FileSystemCache ,
609
- stdout : TextIO ,
610
- stderr : TextIO ,
609
+ stdout : TextIO | None ,
610
+ stderr : TextIO | None ,
611
611
error_formatter : ErrorFormatter | None = None ,
612
612
) -> None :
613
613
self .stats : dict [str , Any ] = {} # Values are ints or floats
@@ -1075,7 +1075,7 @@ def read_plugins_snapshot(manager: BuildManager) -> dict[str, str] | None:
1075
1075
1076
1076
1077
1077
def read_quickstart_file (
1078
- options : Options , stdout : TextIO
1078
+ options : Options , stdout : TextIO | None
1079
1079
) -> dict [str , tuple [float , int , str ]] | None :
1080
1080
quickstart : dict [str , tuple [float , int , str ]] | None = None
1081
1081
if options .quickstart_file :
@@ -2879,7 +2879,7 @@ def log_configuration(manager: BuildManager, sources: list[BuildSource]) -> None
2879
2879
# The driver
2880
2880
2881
2881
2882
- def dispatch (sources : list [BuildSource ], manager : BuildManager , stdout : TextIO ) -> Graph :
2882
+ def dispatch (sources : list [BuildSource ], manager : BuildManager , stdout : TextIO | None ) -> Graph :
2883
2883
log_configuration (manager , sources )
2884
2884
2885
2885
t0 = time .time ()
0 commit comments