|
9 | 9 | import sys |
10 | 10 | import traceback |
11 | 11 | from collections import ChainMap |
| 12 | +from collections.abc import Iterator, Mapping, MutableMapping |
| 13 | +from pathlib import Path |
12 | 14 | from subprocess import PIPE, Popen |
13 | | -from typing import Any, BinaryIO, ClassVar, Iterator, List, Mapping, MutableMapping, Optional, Tuple |
| 15 | +from typing import Any, BinaryIO, ClassVar, Optional |
14 | 16 |
|
15 | 17 | from markdown import Markdown |
16 | 18 | from mkdocstrings.extension import PluginError |
@@ -200,7 +202,7 @@ def load_inventory( |
200 | 202 | url: str, |
201 | 203 | base_url: Optional[str] = None, |
202 | 204 | **kwargs: Any, # noqa: ARG003 |
203 | | - ) -> Iterator[Tuple[str, str]]: |
| 205 | + ) -> Iterator[tuple[str, str]]: |
204 | 206 | """Yield items and their URLs from an inventory file streamed from `in_file`. |
205 | 207 |
|
206 | 208 | This implements mkdocstrings' `load_inventory` "protocol" (see plugin.py). |
@@ -324,7 +326,7 @@ def render(self, data: CollectorItem, config: Mapping[str, Any]) -> str: # noqa |
324 | 326 | **{"config": final_config, data["category"]: data, "heading_level": heading_level, "root": True}, |
325 | 327 | ) |
326 | 328 |
|
327 | | - def get_anchors(self, data: CollectorItem) -> Tuple[str, ...]: # noqa: D102 (ignore missing docstring) |
| 329 | + def get_anchors(self, data: CollectorItem) -> tuple[str, ...]: # noqa: D102 (ignore missing docstring) |
328 | 330 | try: |
329 | 331 | return (data["path"],) |
330 | 332 | except KeyError: |
|
0 commit comments