Skip to content

Commit 16c31c4

Browse files
committed
add: type processing
1 parent a5af694 commit 16c31c4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

foliant/preprocessors/showcommits.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,13 @@ def process_file(self, markdown_file_path):
360360
with open(markdown_file_path, 'w', encoding='utf8') as markdown_file:
361361
markdown_file.write(processed_markdown_content)
362362

363-
def process_all_files(self, list_of_files):
363+
def process_all_files(self, list_of_files: list):
364364
threads = []
365365
for markdown_file_path in list_of_files:
366+
if isinstance(markdown_file_path, (str, Path)):
367+
markdown_file_path = Path(markdown_file_path)
368+
if markdown_file_path.is_absolute():
369+
markdown_file_path = markdown_file_path.relative_to(self.working_dir)
366370
process_file_thread = threading.Thread(target=self.process_file,
367371
args=[markdown_file_path])
368372
process_file_thread.start()

0 commit comments

Comments
 (0)