File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ def main(
7777 # As a common pattern around the codebase, we tend to do this instead of
7878 # using default arguments that are mutable objects (due to Python's
7979 # famously counterintuitive behavior about those): use a sentinel, then
80- # set.
80+ # set. If there is no `= None` after the type, we don't manipulate it thus.
8181 stdout = stdout if stdout is not None else sys .stdout
8282 stderr = stderr if stderr is not None else sys .stderr
8383 # sys.stdout and sys.stderr might technically be None, but this fact isn't
@@ -192,14 +192,12 @@ def run_build(
192192 options : Options ,
193193 fscache : FileSystemCache ,
194194 t0 : float ,
195- stdout : TextIO | None = None ,
196- stderr : TextIO | None = None ,
195+ stdout : TextIO | None ,
196+ stderr : TextIO | None ,
197197) -> tuple [build .BuildResult | None , list [str ], bool ]:
198198 formatter = util .FancyFormatter (
199199 stdout , stderr , options .hide_error_codes , hide_success = bool (options .output )
200200 )
201- stdout = stdout if stdout is not None else sys .stdout
202- stderr = stderr if stderr is not None else sys .stderr
203201 messages = []
204202 messages_by_file = defaultdict (list )
205203
You can’t perform that action at this time.
0 commit comments