Complete stubs for commonmark (#13724)

This commit is contained in:
Semyon Moroz
2025-03-27 20:45:31 +04:00
committed by GitHub
parent b68907b104
commit 3e49c2d5b2
6 changed files with 8 additions and 7 deletions
-1
View File
@@ -34,7 +34,6 @@
"stubs/cffi",
"stubs/click-default-group",
"stubs/click-web",
"stubs/commonmark",
"stubs/corus",
"stubs/dateparser",
"stubs/defusedxml",
@@ -0,0 +1,2 @@
# Testing modules are not included in type stubs
commonmark.tests.*
-4
View File
@@ -1,6 +1,2 @@
version = "0.9.*"
upstream_repository = "https://github.com/rtfd/commonmark.py"
partial_stub = true
[tool.stubtest]
ignore_missing_stub = true
@@ -1 +1,3 @@
def _unescape(s: str) -> str: ...
__all__ = ["_unescape"]
+2 -2
View File
@@ -50,14 +50,14 @@ class InlineParser:
def removeDelimiter(self, delim: dict[str, Any]) -> None: ...
@staticmethod
def removeDelimitersBetween(bottom: dict[str, Any], top: dict[str, Any]) -> None: ...
def processEmphasis(self, stack_bottom) -> None: ...
def processEmphasis(self, stack_bottom: dict[str, Any]) -> None: ...
def parseLinkTitle(self) -> str | None: ...
def parseLinkDestination(self) -> str | None: ...
def parseLinkLabel(self) -> int: ...
def parseOpenBracket(self, block: Node) -> Literal[True]: ...
def parseBang(self, block: Node) -> Literal[True]: ...
def parseCloseBracket(self, block: Node) -> Literal[True]: ...
def addBracket(self, node, index, image) -> None: ...
def addBracket(self, node: Node, index: int, image: bool | None) -> None: ...
def removeBracket(self) -> None: ...
def parseEntity(self, block: Node) -> bool: ...
def parseString(self, block: Node) -> bool: ...
@@ -1 +1,3 @@
def normalize_reference(string: str) -> str: ...
__all__ = ["normalize_reference"]