Skip to content

Commit 3941e06

Browse files
authored
Annotate markdown.util.get_installed_extensions (#13822)
1 parent 70dab53 commit 3941e06

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

stubs/Markdown/markdown/util.pyi

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
from collections.abc import Iterator
23
from re import Pattern
34
from typing import Final, Generic, TypedDict, TypeVar, overload
@@ -18,7 +19,13 @@ HTML_PLACEHOLDER_RE: Final[Pattern[str]]
1819
TAG_PLACEHOLDER: Final[str]
1920
RTL_BIDI_RANGES: Final[tuple[tuple[str, str], tuple[str, str]]]
2021

21-
def get_installed_extensions(): ...
22+
if sys.version_info >= (3, 10):
23+
from importlib import metadata
24+
def get_installed_extensions() -> metadata.EntryPoints: ...
25+
26+
else:
27+
def get_installed_extensions(): ...
28+
2229
def deprecated(message: str, stacklevel: int = 2): ...
2330
@overload
2431
def parseBoolValue(value: str) -> bool: ...

0 commit comments

Comments
 (0)