Skip to content

Commit 72e8fa4

Browse files
[pre-commit.ci lite] apply automatic fixes
1 parent 11eaa24 commit 72e8fa4

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

mkdocs_click/_docs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55

66
import inspect
77
from contextlib import ExitStack, contextmanager
8-
from typing import Iterator, cast
8+
from typing import TYPE_CHECKING, cast
99

1010
import click
1111
from markdown.extensions.toc import slugify
1212

1313
from ._exceptions import MkDocsClickException
1414

15+
if TYPE_CHECKING:
16+
from collections.abc import Iterator
17+
1518

1619
def make_command_docs(
1720
prog_name: str,

mkdocs_click/_extension.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Licensed under the Apache license (see LICENSE)
44
from __future__ import annotations
55

6-
from typing import Any, Iterator
6+
from typing import TYPE_CHECKING, Any
77

88
from markdown.extensions import Extension
99
from markdown.extensions.attr_list import AttrListExtension
@@ -14,6 +14,9 @@
1414
from ._loader import load_command
1515
from ._processing import replace_blocks
1616

17+
if TYPE_CHECKING:
18+
from collections.abc import Iterator
19+
1720

1821
def replace_command_docs(has_attr_list: bool = False, **options: Any) -> Iterator[str]:
1922
for option in ("module", "command"):

mkdocs_click/_processing.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
from __future__ import annotations
55

66
import re
7-
from typing import Callable, Iterable, Iterator
7+
from typing import TYPE_CHECKING, Callable
8+
9+
if TYPE_CHECKING:
10+
from collections.abc import Iterable, Iterator
811

912

1013
def replace_blocks(

0 commit comments

Comments
 (0)