|
6 | 6 |
|
7 | 7 | class MarkdownGenerator(GeneratorBase):
|
8 | 8 | 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 |
| - } |
21 | 9 |
|
22 | 10 | def __init__(
|
23 | 11 | self,
|
24 | 12 | contributing_guide_url: Union[str, None] = None,
|
25 | 13 | output_file_name: str = "comment",
|
26 | 14 | ) -> 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 | + } |
27 | 22 | self.output_file_name = output_file_name
|
28 | 23 | self.contributing_guide_line = (
|
29 | 24 | (f" For more details, check our [Contributing Guide]({contributing_guide_url}).\n\n")
|
|
0 commit comments