Skip to content

Commit efe551a

Browse files
Jake AdamsJake Adams
authored andcommitted
Use pathlib.Path.stem to extract file name.
1 parent b6f41ce commit efe551a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

issue_metrics.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"""
1717

1818
import shutil
19+
from pathlib import Path
1920
from typing import List, Union
2021

2122
import github3
@@ -350,7 +351,7 @@ def main(): # pragma: no cover
350351
output_file=output_file,
351352
)
352353

353-
file_name_without_extension = output_file.split(".")[0]
354+
file_name_without_extension = Path(output_file).stem
354355
max_char_count = 65535
355356
if markdown_too_large_for_issue_body(output_file, max_char_count):
356357
split_markdown_file(output_file, max_char_count)

0 commit comments

Comments
 (0)