Skip to content

Commit 3ad8397

Browse files
committed
fix: attempt to fix ruff issues
1 parent 4b364e4 commit 3ad8397

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

scripts/guideline_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def save_guideline_file(
473473
if not chapter_dir.is_dir():
474474
# Fall back to legacy monolithic file structure
475475
print(f"Note: Chapter directory {chapter_dir} not found.")
476-
print(f" Using legacy file structure. Run split_guidelines.py to migrate.")
476+
print(" Using legacy file structure. Run split_guidelines.py to migrate.")
477477
return save_guideline_file_legacy(content, chapter, guidelines_dir)
478478

479479
# Extract guideline ID

scripts/split_guidelines.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
import re
3737
import sys
3838
from pathlib import Path
39-
from typing import List, Optional, Tuple
40-
39+
from typing import List, Tuple
4140

4241
# SPDX header to prepend to each generated file
4342
SPDX_HEADER = """\
@@ -230,7 +229,7 @@ def split_chapter(
230229
chapter_title, header_content, guidelines = parse_chapter_file(src_file)
231230

232231
if not guidelines:
233-
print(f" No guidelines found - creating empty chapter structure")
232+
print(" No guidelines found - creating empty chapter structure")
234233
else:
235234
print(f" Found {len(guidelines)} guidelines")
236235

@@ -243,7 +242,7 @@ def split_chapter(
243242
if dry_run:
244243
print(f" Would create directory: {chapter_dir}")
245244
print(f" Would create {len(guidelines)} guideline files (.rst.inc)")
246-
print(f" Would create index.rst")
245+
print(" Would create index.rst")
247246
return len(guidelines), [g[0] for g in guidelines]
248247

249248
# Create chapter directory
@@ -313,7 +312,7 @@ def update_main_index(
313312
print(f"\nUpdated main index at {index_file}")
314313
print(f" Updated chapters: {', '.join(updated_chapters)}")
315314
else:
316-
print(f"\nMain index already up to date (or no matching chapters found)")
315+
print("\nMain index already up to date (or no matching chapters found)")
317316

318317

319318
def get_chapter_files(src_dir: Path) -> List[Path]:
@@ -484,7 +483,7 @@ def main():
484483
else:
485484
print("\n=== To apply changes ===")
486485
print("Run without --dry-run:")
487-
print(f" uv run python scripts/split_guidelines.py --all --update-index --cleanup")
486+
print(" uv run python scripts/split_guidelines.py --all --update-index --cleanup")
488487

489488

490489
if __name__ == "__main__":

0 commit comments

Comments
 (0)