Skip to content

Commit 881a35a

Browse files
authored
Revert "Enable colored output for argparse help in Python 3.14 (#19021)" (#19721)
Reverts #19021 After the PR was merged, `color` was changed to `true` for Python 3.14. Setting it manually is no longer necessary. python/cpython#136809 https://docs.python.org/3.14/library/argparse.html#color
1 parent ffe2db8 commit 881a35a

File tree

4 files changed

+0
-9
lines changed

4 files changed

+0
-9
lines changed

mypy/dmypy/client.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ def __init__(self, prog: str, **kwargs: Any) -> None:
3636
parser = argparse.ArgumentParser(
3737
prog="dmypy", description="Client for mypy daemon mode", fromfile_prefix_chars="@"
3838
)
39-
if sys.version_info >= (3, 14):
40-
parser.color = True # Set as init arg in 3.14
41-
4239
parser.set_defaults(action=None)
4340
parser.add_argument(
4441
"--status-file", default=DEFAULT_STATUS_FILE, help="status file to retrieve daemon details"

mypy/main.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,6 @@ def define_options(
485485
stdout=stdout,
486486
stderr=stderr,
487487
)
488-
if sys.version_info >= (3, 14):
489-
parser.color = True # Set as init arg in 3.14
490488

491489
strict_flag_names: list[str] = []
492490
strict_flag_assignments: list[tuple[str, bool]] = []

mypy/stubgen.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1899,8 +1899,6 @@ def parse_options(args: list[str]) -> Options:
18991899
parser = argparse.ArgumentParser(
19001900
prog="stubgen", usage=HEADER, description=DESCRIPTION, fromfile_prefix_chars="@"
19011901
)
1902-
if sys.version_info >= (3, 14):
1903-
parser.color = True # Set as init arg in 3.14
19041902

19051903
parser.add_argument(
19061904
"--ignore-errors",

mypy/stubtest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2348,8 +2348,6 @@ def parse_options(args: list[str]) -> _Arguments:
23482348
parser = argparse.ArgumentParser(
23492349
description="Compares stubs to objects introspected from the runtime."
23502350
)
2351-
if sys.version_info >= (3, 14):
2352-
parser.color = True # Set as init arg in 3.14
23532351
parser.add_argument("modules", nargs="*", help="Modules to test")
23542352
parser.add_argument(
23552353
"--concise",

0 commit comments

Comments
 (0)