Skip to content

Commit 8585faf

Browse files
committed
fix: resolve Python linting issues
1 parent 6b930a4 commit 8585faf

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

scripts/auto-pr-helper.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
"""
66
This script transforms a GitHub issue JSON into RST format for coding guidelines.
77
8-
It reads a GitHub issue's JSON data from standard input, parses its body
9-
(which is expected to follow a specific issue template), and converts it
8+
It reads a GitHub issue's JSON data from standard input, parses its body
9+
(which is expected to follow a specific issue template), and converts it
1010
into a formatted reStructuredText (.rst) guideline.
1111
1212
Usage:
1313
cat issue.json | uv run python scripts/auto-pr-helper.py
1414
cat issue.json | uv run python scripts/auto-pr-helper.py --save
15+
16+
Location: scripts/auto-pr-helper.py (replaces existing file)
1517
"""
1618

1719
import argparse
@@ -21,8 +23,8 @@
2123
from guideline_utils import (
2224
extract_form_fields,
2325
guideline_template,
24-
normalize_md,
2526
normalize_list_separation,
27+
normalize_md,
2628
save_guideline_file,
2729
)
2830

scripts/generate-rst-comment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
import sys
1818

1919
from guideline_utils import (
20+
chapter_to_filename,
2021
extract_form_fields,
2122
guideline_template,
22-
normalize_md,
2323
normalize_list_separation,
24-
chapter_to_filename,
24+
normalize_md,
2525
)
2626

2727

scripts/guidelines_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
This module contains common functions used by:
88
- auto-pr-helper.py (for automated PR generation)
99
- generate-rst-comment.py (for generating preview comments)
10+
11+
Location: scripts/guideline_utils.py
1012
"""
1113

14+
import os
1215
import re
16+
import sys
1317
from textwrap import dedent, indent
1418

1519
import pypandoc
1620

17-
# Import the template function and header map from the main module
18-
import sys
19-
import os
20-
2121
script_dir = os.path.dirname(os.path.abspath(__file__))
2222
parent_dir = os.path.abspath(os.path.join(script_dir, ".."))
2323
sys.path.append(parent_dir)

0 commit comments

Comments
 (0)