chore: color and suggest_on_error are now default (3.14rc1+) (#2554)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
@@ -6,17 +6,12 @@
|
|||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import copy
|
import copy
|
||||||
import functools
|
|
||||||
import json
|
import json
|
||||||
import sys
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
make_parser = functools.partial(argparse.ArgumentParser, allow_abbrev=False)
|
parser = argparse.ArgumentParser(allow_abbrev=False)
|
||||||
if sys.version_info >= (3, 14):
|
|
||||||
make_parser = functools.partial(make_parser, color=True, suggest_on_error=True)
|
|
||||||
parser = make_parser()
|
|
||||||
parser.add_argument("--schemastore", action="store_true", help="Generate schema_store version")
|
parser.add_argument("--schemastore", action="store_true", help="Generate schema_store version")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
|||||||
+1
-5
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import functools
|
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
@@ -14,10 +13,7 @@ if __name__ == "__main__":
|
|||||||
else:
|
else:
|
||||||
default_cpu_count = os.process_cpu_count() or 2
|
default_cpu_count = os.process_cpu_count() or 2
|
||||||
|
|
||||||
make_parser = functools.partial(argparse.ArgumentParser, allow_abbrev=False)
|
parser = argparse.ArgumentParser(allow_abbrev=False)
|
||||||
if sys.version_info >= (3, 14):
|
|
||||||
make_parser = functools.partial(make_parser, color=True, suggest_on_error=True)
|
|
||||||
parser = make_parser()
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--run-podman", action="store_true", default=False, help="run podman tests (linux only)"
|
"--run-podman", action="store_true", default=False, help="run podman tests (linux only)"
|
||||||
)
|
)
|
||||||
|
|||||||
+1
-5
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import functools
|
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
@@ -13,10 +12,7 @@ if __name__ == "__main__":
|
|||||||
# move cwd to the project root
|
# move cwd to the project root
|
||||||
os.chdir(Path(__file__).resolve().parents[1])
|
os.chdir(Path(__file__).resolve().parents[1])
|
||||||
|
|
||||||
make_parser = functools.partial(argparse.ArgumentParser, allow_abbrev=False)
|
parser = argparse.ArgumentParser(description="Runs a sample build", allow_abbrev=False)
|
||||||
if sys.version_info >= (3, 14):
|
|
||||||
make_parser = functools.partial(make_parser, color=True, suggest_on_error=True)
|
|
||||||
parser = make_parser(description="Runs a sample build")
|
|
||||||
parser.add_argument("project_python_path", nargs="?", default="test.test_0_basic.basic_project")
|
parser.add_argument("project_python_path", nargs="?", default="test.test_0_basic.basic_project")
|
||||||
|
|
||||||
options = parser.parse_args()
|
options = parser.parse_args()
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import contextlib
|
import contextlib
|
||||||
import dataclasses
|
import dataclasses
|
||||||
import functools
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
@@ -80,16 +79,14 @@ def main_inner(global_options: GlobalOptions) -> None:
|
|||||||
rather than exiting directly.
|
rather than exiting directly.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
make_parser = functools.partial(argparse.ArgumentParser, allow_abbrev=False)
|
parser = argparse.ArgumentParser(
|
||||||
if sys.version_info >= (3, 14):
|
|
||||||
make_parser = functools.partial(make_parser, color=True, suggest_on_error=True)
|
|
||||||
parser = make_parser(
|
|
||||||
description="Build wheels for all the platforms.",
|
description="Build wheels for all the platforms.",
|
||||||
epilog="""
|
epilog="""
|
||||||
Most options are supplied via environment variables or in
|
Most options are supplied via environment variables or in
|
||||||
--config-file (pyproject.toml usually). See
|
--config-file (pyproject.toml usually). See
|
||||||
https://github.com/pypa/cibuildwheel#options for info.
|
https://github.com/pypa/cibuildwheel#options for info.
|
||||||
""",
|
""",
|
||||||
|
allow_abbrev=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
|||||||
Reference in New Issue
Block a user