added ruff code reivew

This commit is contained in:
ykcheungab
2026-09-27 19:21:55 +08:00
parent 07da372204
commit e2ac36269c
110 changed files with 890 additions and 426 deletions
+1
View File
@@ -25,6 +25,7 @@ from common.verify.wheel import ( # noqa: E402
verify_wheel_runtime,
)
from common.verify.wheel_contents import inspect_wheel # noqa: E402
from release import auth, github, pypi # noqa: E402
from release.preflight import PreflightOptions, run_preflight # noqa: E402
+1
View File
@@ -29,6 +29,7 @@ if str(_BUILD_ROOT) not in sys.path:
sys.path.insert(0, str(_BUILD_ROOT))
from common.paths import REPO_ROOT # noqa: E402
from release.publish import GateResult, PublishGateError, load_gate # noqa: E402
MANIFEST_PATH = REPO_ROOT / "tools" / "downstream_sync_manifest.json"
+5 -1
View File
@@ -45,9 +45,13 @@ from common.verify.wheel import ( # noqa: E402
verify_wheel,
)
from common.verify.wheel_contents import inspect_wheel # noqa: E402
from wheel.layout import ( # noqa: E402
resolve_bundle_source_files,
verify_required_assets,
)
from release import report as report_mod # noqa: E402
from release import version as version_mod # noqa: E402
from wheel.layout import resolve_bundle_source_files, verify_required_assets # noqa: E402
@dataclass
+2 -2
View File
@@ -18,7 +18,6 @@ probe, and ``--apply`` being required even to reach TestPyPI.
from __future__ import annotations
import json
import shutil
import subprocess
import sys
import tempfile
@@ -33,6 +32,7 @@ if str(_BUILD_ROOT) not in sys.path:
sys.path.insert(0, str(_BUILD_ROOT))
from common.paths import REPO_ROOT # noqa: E402
from release import auth # noqa: E402
from release.publish import GateResult, PublishGateError, load_gate # noqa: E402
@@ -452,7 +452,7 @@ def publish(options: Options) -> int:
print()
if options.pypi_only:
print(f"=== release pypi PASSED (PyPI only, no TestPyPI rehearsal) ===")
print("=== release pypi PASSED (PyPI only, no TestPyPI rehearsal) ===")
else:
print("=== release pypi PASSED (TestPyPI + PyPI) ===")
return 0