Skip to content

Commit 95c7f7d

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b1d200d commit 95c7f7d

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

bug_triage.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,15 @@ def read_bugs() -> list[dict]:
7070
severity = classify_severity(content)
7171
priority = classify_priority(severity)
7272

73-
bugs.append({
74-
"id": f"BUG-{i+1:03}",
75-
"file": file_path,
76-
"severity": severity,
77-
"priority": priority,
78-
"summary": content.strip().split("\n")[0][:80]
79-
})
73+
bugs.append(
74+
{
75+
"id": f"BUG-{i + 1:03}",
76+
"file": file_path,
77+
"severity": severity,
78+
"priority": priority,
79+
"summary": content.strip().split("\n")[0][:80],
80+
}
81+
)
8082
except OSError as e:
8183
logger.warning("Could not read file %s: %s", file_path, e)
8284

@@ -119,7 +121,7 @@ def generate_report(bugs: list[dict]) -> None:
119121
f"| P3 | {len(p3)} |",
120122
f"| P4 | {len(p4)} |",
121123
"\n---\n",
122-
"## P1 Bugs (Critical)"
124+
"## P1 Bugs (Critical)",
123125
]
124126

125127
for b in p1:
@@ -141,6 +143,7 @@ def generate_report(bugs: list[dict]) -> None:
141143

142144
if __name__ == "__main__":
143145
import doctest
146+
144147
doctest.testmod()
145148
extracted_bugs = read_bugs()
146149
generate_report(extracted_bugs)

0 commit comments

Comments
 (0)