Skip to content

Commit cf0de50

Browse files
simplify the function signature of parse_config_file, which did not even use stdout anyway
1 parent f08e730 commit cf0de50

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

mypy/config_parser.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ def parse_config_file(
314314
options: Options,
315315
set_strict_flags: Callable[[], None],
316316
filename: str | None,
317-
stdout: TextIO | None = None,
318317
stderr: TextIO | None = None,
319318
) -> None:
320319
"""Parse a config file into an Options object.
@@ -323,7 +322,6 @@ def parse_config_file(
323322
324323
If filename is None, fall back to default config files.
325324
"""
326-
stdout = stdout or sys.stdout
327325
stderr = stderr or sys.stderr
328326

329327
ret = (

mypy/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,7 @@ def set_strict_flags() -> None:
13791379
setattr(options, dest, value)
13801380

13811381
# Parse config file first, so command line can override.
1382-
parse_config_file(options, set_strict_flags, config_file, stdout, stderr)
1382+
parse_config_file(options, set_strict_flags, config_file, stderr)
13831383

13841384
# Set strict flags before parsing (if strict mode enabled), so other command
13851385
# line options can override.

mypy/stubtest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2016,7 +2016,7 @@ def test_stubs(args: _Arguments, use_builtins_fixtures: bool = False) -> int:
20162016
def set_strict_flags() -> None: # not needed yet
20172017
return
20182018

2019-
parse_config_file(options, set_strict_flags, options.config_file, sys.stdout, sys.stderr)
2019+
parse_config_file(options, set_strict_flags, options.config_file, sys.stderr)
20202020

20212021
def error_callback(msg: str) -> typing.NoReturn:
20222022
print(_style("error:", color="red", bold=True), msg)

0 commit comments

Comments
 (0)