[CI][RFC] Replace black-jupyter with ruff-format (#37210)

Co-authored-by: Alison Shao <a.shao@wustl.edu>
This commit is contained in:
Alex Nails
2026-09-02 19:46:08 -07:00
committed by GitHub
co-authored by Alison Shao
parent 2641e427be
commit 28262c20df
1411 changed files with 7766 additions and 8176 deletions
+3 -8
View File
@@ -157,9 +157,7 @@ def get_oss_repo(dry_run):
"""
gh_token = os.getenv("GH_TOKEN")
if not gh_token:
print(
"⚠️ Warning: GH_TOKEN environment variable not set. Skipping PR creation."
)
print("⚠️ Warning: GH_TOKEN environment variable not set. Skipping PR creation.")
if not dry_run:
return
@@ -361,9 +359,7 @@ def create_pull_request(oss_root, branch_name, title, body, dry_run):
"""Create a pull request in the OSS repo using the GitHub CLI."""
gh_token = os.getenv("GH_TOKEN")
if not gh_token:
print(
"⚠️ Warning: GH_TOKEN environment variable not set. Skipping PR creation."
)
print("⚠️ Warning: GH_TOKEN environment variable not set. Skipping PR creation.")
if not dry_run:
return
@@ -569,8 +565,7 @@ def main():
"Please check the CI logs for the full patch and conflict details."
)
pr_body_parts.append(
f"\n\n---\n\n"
f"*This is an automated PR created by scripts/copy_to_oss.py.*"
f"\n\n---\n\n*This is an automated PR created by scripts/copy_to_oss.py.*"
)
pr_body = "\n".join(pr_body_parts)
+2 -5
View File
@@ -120,14 +120,11 @@ def find_latest_oss_sync_commit(repo_root: Optional[str] = None) -> Optional[str
if m:
oss_commit = m.group(1)
print(
f"✅ Latest OSS sync commit found: {oss_commit} "
f"(from: {subject})"
f"✅ Latest OSS sync commit found: {oss_commit} (from: {subject})"
)
return oss_commit
print(
"⚠️ No '[Automated PR] Copy OSS code from commit ...' " "found in history."
)
print("⚠️ No '[Automated PR] Copy OSS code from commit ...' found in history.")
return None
except subprocess.CalledProcessError as e: