Skip to content

Commit 95e827e

Browse files
authored
chore: color and suggest_on_error are now default (3.14rc1+) (#2554)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent ff9a284 commit 95e827e

File tree

4 files changed

+5
-21
lines changed

4 files changed

+5
-21
lines changed

bin/generate_schema.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,12 @@
66

77
import argparse
88
import copy
9-
import functools
109
import json
11-
import sys
1210
from typing import Any
1311

1412
import yaml
1513

16-
make_parser = functools.partial(argparse.ArgumentParser, allow_abbrev=False)
17-
if sys.version_info >= (3, 14):
18-
make_parser = functools.partial(make_parser, color=True, suggest_on_error=True)
19-
parser = make_parser()
14+
parser = argparse.ArgumentParser(allow_abbrev=False)
2015
parser.add_argument("--schemastore", action="store_true", help="Generate schema_store version")
2116
args = parser.parse_args()
2217

bin/run_tests.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33

44
import argparse
5-
import functools
65
import os
76
import subprocess
87
import sys
@@ -14,10 +13,7 @@
1413
else:
1514
default_cpu_count = os.process_cpu_count() or 2
1615

17-
make_parser = functools.partial(argparse.ArgumentParser, allow_abbrev=False)
18-
if sys.version_info >= (3, 14):
19-
make_parser = functools.partial(make_parser, color=True, suggest_on_error=True)
20-
parser = make_parser()
16+
parser = argparse.ArgumentParser(allow_abbrev=False)
2117
parser.add_argument(
2218
"--run-podman", action="store_true", default=False, help="run podman tests (linux only)"
2319
)

bin/sample_build.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33

44
import argparse
5-
import functools
65
import os
76
import subprocess
87
import sys
@@ -13,10 +12,7 @@
1312
# move cwd to the project root
1413
os.chdir(Path(__file__).resolve().parents[1])
1514

16-
make_parser = functools.partial(argparse.ArgumentParser, allow_abbrev=False)
17-
if sys.version_info >= (3, 14):
18-
make_parser = functools.partial(make_parser, color=True, suggest_on_error=True)
19-
parser = make_parser(description="Runs a sample build")
15+
parser = argparse.ArgumentParser(description="Runs a sample build", allow_abbrev=False)
2016
parser.add_argument("project_python_path", nargs="?", default="test.test_0_basic.basic_project")
2117

2218
options = parser.parse_args()

cibuildwheel/__main__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import argparse
22
import contextlib
33
import dataclasses
4-
import functools
54
import os
65
import shutil
76
import sys
@@ -80,16 +79,14 @@ def main_inner(global_options: GlobalOptions) -> None:
8079
rather than exiting directly.
8180
"""
8281

83-
make_parser = functools.partial(argparse.ArgumentParser, allow_abbrev=False)
84-
if sys.version_info >= (3, 14):
85-
make_parser = functools.partial(make_parser, color=True, suggest_on_error=True)
86-
parser = make_parser(
82+
parser = argparse.ArgumentParser(
8783
description="Build wheels for all the platforms.",
8884
epilog="""
8985
Most options are supplied via environment variables or in
9086
--config-file (pyproject.toml usually). See
9187
https://github.com/pypa/cibuildwheel#options for info.
9288
""",
89+
allow_abbrev=False,
9390
)
9491

9592
parser.add_argument(

0 commit comments

Comments
 (0)