Skip to content

Commit 5e94497

Browse files
[crash template] Add <details> tag and current headers for clearer result
refs #8509
1 parent 366e346 commit 5e94497

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

pylint/lint/utils.py

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ def prepare_crash_report(ex: Exception, filepath: str, crash_file_path: str) ->
3030
https://github.com/PyCQA/pylint/issues/new?assignees=&labels=crash%2Cneeds+triage&template=BUG-REPORT.yml
3131
3232
"""
33-
template += f"""\
34-
33+
template += f"""
3534
Issue title:
3635
Crash ``{ex}`` (if possible, be more specific about what made pylint crash)
37-
Content:
38-
When parsing the following file:
36+
37+
### Bug description
38+
39+
When parsing the following ``a.py``:
3940
4041
<!--
4142
If sharing the code is not an option, please state so,
@@ -46,11 +47,27 @@ def prepare_crash_report(ex: Exception, filepath: str, crash_file_path: str) ->
4647
{file_content}
4748
```
4849
49-
pylint crashed with a ``{ex.__class__.__name__}`` and with the following stacktrace:
50+
### Command used
51+
52+
```shell
53+
pylint a.py
5054
```
55+
56+
### Pylint output
57+
58+
<details open>
59+
<summary>
60+
pylint crashed with a ``{ex.__class__.__name__}`` and with the following stacktrace:
61+
</summary>
62+
63+
```python
5164
"""
5265
template += traceback.format_exc()
53-
template += "```\n"
66+
template += """
67+
```
68+
69+
</details>
70+
"""
5471
try:
5572
with open(issue_template_path, "a", encoding="utf8") as f:
5673
f.write(template)

0 commit comments

Comments
 (0)