Skip to content

Commit a25e0a2

Browse files
committed
fix tracemalloc errors (#69)
1 parent 5f8aa35 commit a25e0a2

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/markdown_checker/reports/md_reports/generator.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,19 @@
66

77
class MarkdownGenerator(GeneratorBase):
88
current_dir = pathlib.Path(__file__).parent
9-
check_broken_paths_template = open(current_dir / "templates/paths/broken.md").read()
10-
check_broken_urls_template = open(current_dir / "templates/urls/broken.md").read()
11-
check_paths_tracking_template = open(current_dir / "templates/paths/tracking.md").read()
12-
check_urls_tracking_template = open(current_dir / "templates/urls/tracking.md").read()
13-
check_urls_locale_template = open(current_dir / "templates/urls/locale.md").read()
14-
templates = {
15-
"check_broken_paths": check_broken_paths_template,
16-
"check_broken_urls": check_broken_urls_template,
17-
"check_paths_tracking": check_paths_tracking_template,
18-
"check_urls_tracking": check_urls_tracking_template,
19-
"check_urls_locale": check_urls_locale_template,
20-
}
219

2210
def __init__(
2311
self,
2412
contributing_guide_url: Union[str, None] = None,
2513
output_file_name: str = "comment",
2614
) -> None:
15+
self.templates = {
16+
"check_broken_paths": open(self.current_dir / "templates/paths/broken.md").read(),
17+
"check_broken_urls": open(self.current_dir / "templates/urls/broken.md").read(),
18+
"check_paths_tracking": open(self.current_dir / "templates/paths/tracking.md").read(),
19+
"check_urls_tracking": open(self.current_dir / "templates/urls/tracking.md").read(),
20+
"check_urls_locale": open(self.current_dir / "templates/urls/locale.md").read(),
21+
}
2722
self.output_file_name = output_file_name
2823
self.contributing_guide_line = (
2924
(f" For more details, check our [Contributing Guide]({contributing_guide_url}).\n\n")

0 commit comments

Comments
 (0)