Skip to content

Commit 1f34cb6

Browse files
author
Bittor Alaña
committed
Use python 3.8-compatible type hints
Use typing's `List` and `Tuple` instead of the native `list` and `tuple` that were introduced in 3.9.
1 parent 7068a96 commit 1f34cb6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/mkdocs_print_site_plugin/renderer.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import logging
22
import re
3+
from typing import List, Tuple
34

45
import jinja2
56
from mkdocs.structure.toc import AnchorLink, TableOfContents
@@ -41,7 +42,7 @@ def __init__(
4142
def _get_items(self):
4243
return [i for i in self.items if not i == self.print_page]
4344

44-
def write_combined(self) -> tuple[str, TableOfContents]:
45+
def write_combined(self) -> Tuple[str, TableOfContents]:
4546
"""
4647
Generates the HTML of the page that combines all page into one, while filling
4748
a table of contents.
@@ -78,8 +79,8 @@ def get_html_and_anchor_links_from_items(
7879
excluded_pages: list,
7980
level: int = 0,
8081
prefix: str = "",
81-
heading_styles: list[str] = [],
82-
) -> tuple[str, list[AnchorLink]]:
82+
heading_styles: List[str] = [],
83+
) -> Tuple[str, List[AnchorLink]]:
8384
"""
8485
Get all the HTML and anchor links from the pages.
8586
"""

0 commit comments

Comments
 (0)