Skip to content

Commit c378b45

Browse files
anth-volkclaude
andcommitted
Fix ruff formatting in check_updates.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f974ee8 commit c378b45

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

.github/scripts/check_updates.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def get_current_versions(pyproject_content):
2727
"""Extract current pinned versions from pyproject.toml."""
2828
versions = {}
2929
for pkg in PACKAGES:
30-
pattern = rf'{pkg.replace("_", "[-_]")}==([0-9]+\.[0-9]+\.[0-9]+)'
30+
pattern = rf"{pkg.replace('_', '[-_]')}==([0-9]+\.[0-9]+\.[0-9]+)"
3131
match = re.search(pattern, pyproject_content)
3232
if match:
3333
versions[pkg] = match.group(1)
@@ -57,8 +57,8 @@ def find_updates(current, latest):
5757
def update_pyproject(content, updates):
5858
"""Replace pinned versions in pyproject.toml content."""
5959
for pkg, versions in updates.items():
60-
pattern = rf'({pkg.replace("_", "[-_]")}==)[0-9]+\.[0-9]+\.[0-9]+'
61-
content = re.sub(pattern, rf'\g<1>{versions["new"]}', content)
60+
pattern = rf"({pkg.replace('_', '[-_]')}==)[0-9]+\.[0-9]+\.[0-9]+"
61+
content = re.sub(pattern, rf"\g<1>{versions['new']}", content)
6262
return content
6363

6464

@@ -112,9 +112,7 @@ def parse_changelog(text):
112112
item_match = re.match(r"^-\s+(.+)", line)
113113
if item_match and current_category:
114114
current_entry["changes"].setdefault(current_category, [])
115-
current_entry["changes"][current_category].append(
116-
item_match.group(1)
117-
)
115+
current_entry["changes"][current_category].append(item_match.group(1))
118116

119117
return entries
120118

@@ -142,8 +140,7 @@ def format_changes(entries):
142140
for cat, items in buckets.items():
143141
if items:
144142
sections.append(
145-
f"### {cat.capitalize()}\n"
146-
+ "\n".join(f"- {item}" for item in items)
143+
f"### {cat.capitalize()}\n" + "\n".join(f"- {item}" for item in items)
147144
)
148145
return "\n\n".join(sections) if sections else "No detailed changes available."
149146

0 commit comments

Comments
 (0)