Skip to content

Commit 24dafbc

Browse files
committed
🎨 Upgrade types in mkdocs_hooks
1 parent c76c025 commit 24dafbc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

scripts/mkdocs_hooks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Union
1+
from typing import Any
22

33
from mkdocs.config.defaults import MkDocsConfig
44
from mkdocs.structure.files import Files
@@ -7,9 +7,9 @@
77

88

99
def generate_renamed_section_items(
10-
items: list[Union[Page, Section, Link]], *, config: MkDocsConfig
11-
) -> list[Union[Page, Section, Link]]:
12-
new_items: list[Union[Page, Section, Link]] = []
10+
items: list[Page | Section | Link], *, config: MkDocsConfig
11+
) -> list[Page | Section | Link]:
12+
new_items: list[Page | Section | Link] = []
1313
for item in items:
1414
if isinstance(item, Section):
1515
new_title = item.title

0 commit comments

Comments
 (0)