[pre-commit.ci] pre-commit autoupdate (#2127)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.9.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.6...v0.9.1) - [github.com/python-jsonschema/check-jsonschema: 0.30.0 → 0.31.0](https://github.com/python-jsonschema/check-jsonschema/compare/0.30.0...0.31.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
parent
a96545b729
commit
c65b088000
@@ -14,7 +14,7 @@ repos:
|
||||
- id: trailing-whitespace
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.8.6
|
||||
rev: v0.9.1
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: ["--fix", "--show-fixes"]
|
||||
@@ -81,7 +81,7 @@ repos:
|
||||
|
||||
|
||||
- repo: https://github.com/python-jsonschema/check-jsonschema
|
||||
rev: 0.30.0
|
||||
rev: 0.31.0
|
||||
hooks:
|
||||
- id: check-dependabot
|
||||
- id: check-github-actions
|
||||
|
||||
@@ -271,7 +271,7 @@ items:
|
||||
)
|
||||
|
||||
for key, value in schema["properties"].items():
|
||||
value["title"] = f'CIBW_{key.replace("-", "_").upper()}'
|
||||
value["title"] = f"CIBW_{key.replace('-', '_').upper()}"
|
||||
|
||||
non_global_options = {k: {"$ref": f"#/properties/{k}"} for k in schema["properties"]}
|
||||
del non_global_options["build"]
|
||||
|
||||
+3
-3
@@ -95,8 +95,8 @@ class Project:
|
||||
def header(cls) -> str:
|
||||
return textwrap.dedent(
|
||||
f"""\
|
||||
| {'Name':{cls.NAME}} | CI | OS | Notes |
|
||||
|{'':-^{cls.NAME+2 }}|----|----|:------|"""
|
||||
| {"Name":{cls.NAME}} | CI | OS | Notes |
|
||||
|{"":-^{cls.NAME + 2}}|----|----|:------|"""
|
||||
)
|
||||
|
||||
@property
|
||||
@@ -219,7 +219,7 @@ def insert_projects_table(
|
||||
|
||||
generated_note = f"<!-- this section is generated by bin/projects.py. Don't edit it directly, instead, edit {input_filename} -->"
|
||||
new_text = (
|
||||
f"{text[:start + len(start_str)]}\n{generated_note}\n\n{projects_table}\n{text[end:]}"
|
||||
f"{text[: start + len(start_str)]}\n{generated_note}\n\n{projects_table}\n{text[end:]}"
|
||||
)
|
||||
|
||||
file.write_text(new_text)
|
||||
|
||||
@@ -188,7 +188,7 @@ def build_in_container(
|
||||
log.step("Running before_all...")
|
||||
|
||||
env = container.get_environment()
|
||||
env["PATH"] = f'/opt/python/cp39-cp39/bin:{env["PATH"]}'
|
||||
env["PATH"] = f"/opt/python/cp39-cp39/bin:{env['PATH']}"
|
||||
env["PIP_DISABLE_PIP_VERSION_CHECK"] = "1"
|
||||
env["PIP_ROOT_USER_ACTION"] = "ignore"
|
||||
env = before_all_options.environment.as_dictionary(
|
||||
@@ -230,7 +230,7 @@ def build_in_container(
|
||||
|
||||
# put this config's python top of the list
|
||||
python_bin = config.path / "bin"
|
||||
env["PATH"] = f'{python_bin}:{env["PATH"]}'
|
||||
env["PATH"] = f"{python_bin}:{env['PATH']}"
|
||||
|
||||
env = build_options.environment.as_dictionary(env, executor=container.environment_executor)
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ def get_python_configurations(
|
||||
log.quiet(
|
||||
unwrap(
|
||||
f"""
|
||||
Note: {ids} {'was' if len(removed_elements) == 1 else 'were'}
|
||||
Note: {ids} {"was" if len(removed_elements) == 1 else "were"}
|
||||
selected, but can't be built on x86_64 so will be skipped automatically.
|
||||
"""
|
||||
)
|
||||
@@ -154,7 +154,7 @@ def install_cpython(_tmp: Path, version: str, url: str, free_threading: bool) ->
|
||||
Error: CPython {version} is not installed.
|
||||
cibuildwheel will not perform system-wide installs when running outside of CI.
|
||||
To build locally, install CPython {version} on this machine, or, disable this
|
||||
version of Python using CIBW_SKIP=cp{version.replace('.', '')}-macosx_*
|
||||
version of Python using CIBW_SKIP=cp{version.replace(".", "")}-macosx_*
|
||||
For portable builds, cibuildwheel needs the official builds from python.org.
|
||||
Download link: {url}
|
||||
"""
|
||||
@@ -229,9 +229,9 @@ def setup_python(
|
||||
else:
|
||||
msg = "Unknown Python implementation"
|
||||
raise ValueError(msg)
|
||||
assert (
|
||||
base_python.exists()
|
||||
), f"{base_python.name} not found, has {list(base_python.parent.iterdir())}"
|
||||
assert base_python.exists(), (
|
||||
f"{base_python.name} not found, has {list(base_python.parent.iterdir())}"
|
||||
)
|
||||
|
||||
log.step("Setting up build environment...")
|
||||
venv_path = tmp / "venv"
|
||||
|
||||
@@ -64,9 +64,9 @@ def test_build_identifiers(tmp_path):
|
||||
build_identifiers = utils.cibuildwheel_get_build_identifiers(
|
||||
project_dir, prerelease_pythons=True
|
||||
)
|
||||
assert len(expected_wheels) == len(
|
||||
build_identifiers
|
||||
), f"{expected_wheels} vs {build_identifiers}"
|
||||
assert len(expected_wheels) == len(build_identifiers), (
|
||||
f"{expected_wheels} vs {build_identifiers}"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
||||
@@ -77,7 +77,7 @@ def test_simple(tmp_path):
|
||||
assert os.path.exists('{package}/setup.py')
|
||||
""",
|
||||
)
|
||||
setup_py_assertion_cmd = f'python -c "{setup_py_assertion_snippet !s}"'
|
||||
setup_py_assertion_cmd = f'python -c "{setup_py_assertion_snippet!s}"'
|
||||
|
||||
# build the wheels from sdist
|
||||
actual_wheels = cibuildwheel_from_sdist_run(
|
||||
|
||||
+3
-3
@@ -295,12 +295,12 @@ def expected_wheels(
|
||||
|
||||
if machine_arch == "arm64":
|
||||
arm64_macosx = _floor_macosx(min_macosx, "11.0")
|
||||
platform_tags = [f'macosx_{arm64_macosx.replace(".", "_")}_arm64']
|
||||
platform_tags = [f"macosx_{arm64_macosx.replace('.', '_')}_arm64"]
|
||||
else:
|
||||
platform_tags = [f'macosx_{min_macosx.replace(".", "_")}_x86_64']
|
||||
platform_tags = [f"macosx_{min_macosx.replace('.', '_')}_x86_64"]
|
||||
|
||||
if include_universal2:
|
||||
platform_tags.append(f'macosx_{min_macosx.replace(".", "_")}_universal2')
|
||||
platform_tags.append(f"macosx_{min_macosx.replace('.', '_')}_universal2")
|
||||
else:
|
||||
msg = f"Unsupported platform {platform!r}"
|
||||
raise Exception(msg)
|
||||
|
||||
Reference in New Issue
Block a user