Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions stubs/docutils/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,3 @@ docutils.readers.TYPE_CHECKING
docutils.utils.TYPE_CHECKING
docutils.writers.TYPE_CHECKING
docutils.writers._html_base.TYPE_CHECKING

# FIXME: new stubtest errors from mypy v1.18.1 that need to be looked at more closely.
# See https://github.com/python/typeshed/pull/14699
docutils\.nodes\.\w+\.content_model
docutils.parsers.docutils_xml.Unknown.content_model
docutils.transforms.universal.SmartQuotes.nodes_to_skip
3 changes: 2 additions & 1 deletion stubs/docutils/docutils/nodes.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ from docutils.transforms import Transform, Transformer
from docutils.utils import Reporter

_N = TypeVar("_N", bound=Node)
_ContentModelCategory: TypeAlias = type[Element] | tuple[type[Element], ...]
_ElementLikeType: TypeAlias = type[Element | Text | Body | Bibliographic | Inline]
_ContentModelCategory: TypeAlias = _ElementLikeType | tuple[_ElementLikeType, ...]
_ContentModelQuantifier: TypeAlias = Literal[".", "?", "+", "*"]
_ContentModelItem: TypeAlias = tuple[_ContentModelCategory, _ContentModelQuantifier]
_ContentModelTuple: TypeAlias = tuple[_ContentModelItem, ...]
Expand Down
2 changes: 1 addition & 1 deletion stubs/docutils/docutils/transforms/universal.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class StripClassesAndElements(Transform):

class SmartQuotes(Transform):
default_priority: ClassVar[int]
nodes_to_skip: ClassVar[tuple[type[nodes.Node], ...]]
nodes_to_skip: ClassVar[tuple[type[nodes.Node | nodes.Special], ...]]
literal_nodes: ClassVar[tuple[type[nodes.Node | nodes.Body], ...]]
smartquotes_action: ClassVar[str]
unsupported_languages: set[str]
Expand Down
Loading