|
1 | | -docutils.nodes.Element.__iter__ # doesn't exist at runtime, but the class is iterable due to __getitem__ |
2 | | -docutils.nodes.Element.tagname # class variable is overridden in __init__ method |
3 | | -docutils.nodes.NodeVisitor.depart_\w+ # Methods are discovered dynamically on commonly-used subclasses |
4 | | -docutils.nodes.NodeVisitor.visit_\w+ # Methods are discovered dynamically on commonly-used subclasses |
5 | | -docutils.nodes.NodeVisitor.__init__ # Argument "document" should be positional-only, but subclasses are not |
| 1 | +# This class variable is overridden in __init__. |
| 2 | +docutils.nodes.Element.tagname |
| 3 | +# The `document` parameter should be positional-only, but there are subclasses where it is not. |
| 4 | +docutils.nodes.NodeVisitor.__init__ |
6 | 5 |
|
7 | | -# these methods take a rawsource parameter that has been deprecated and is completely ignored, so we omit it from the stub |
| 6 | +# This constructor technically still takes a `rawsource` parameter; |
| 7 | +# however, it is deprecated on Text nodes. Passing 'None' prints a warning, and passing |
| 8 | +# anything else will raise. |
| 9 | +# It is omitted for simplicity (e.g. not requiring matching overloads in child classes). |
8 | 10 | docutils.nodes.Text.__new__ |
9 | | -docutils.parsers.rst.directives.admonitions.BaseAdmonition.node_class # must be overridden by base classes (pseudo-abstract) |
10 | | -docutils.statemachine.State.nested_sm # is initialised in __init__ |
11 | | -docutils.statemachine.State.nested_sm_kwargs # is initialised in __init__ |
12 | | -docutils.statemachine.ViewList.__iter__ # doesn't exist at runtime, but the class is iterable due to __getitem__ |
13 | | -docutils.transforms.Transform.apply # method apply is not implemented |
14 | | -docutils.transforms.Transform.__getattr__ |
15 | | -docutils.TransformSpec.unknown_reference_resolvers |
| 11 | + |
| 12 | +# This attribute is required to be overridden by base classes (pseudo-abstractmethod). |
| 13 | +docutils.parsers.rst.directives.admonitions.BaseAdmonition.node_class |
| 14 | + |
| 15 | +# These attributes are initialized to None in the classs-body, then initialized in __init__. |
| 16 | +# It is never None in practice. |
| 17 | +docutils.statemachine.State.nested_sm |
| 18 | +docutils.statemachine.State.nested_sm_kwargs |
| 19 | + |
| 20 | +# These attribute names contain spaces and are set using setattr from docutils.sty. |
16 | 21 | docutils.writers.latex2e.PreambleCmds... contents |
17 | | -docutils.writers.latex2e.PreambleCmds.inline role \w+ # attribute names with spaces, set with setattr() from docutils.sty |
| 22 | +docutils.writers.latex2e.PreambleCmds.inline role \w+ |
18 | 23 |
|
19 | | -# Files that don't exist at runtime of stubtests, raises ImportError: |
| 24 | +# These modules have optional dependencies that likely are not available at runtime. |
20 | 25 | docutils.parsers.commonmark_wrapper |
21 | 26 | docutils.parsers.recommonmark_wrapper |
22 | | -docutils.writers.odf_odt.pygmentsformatter # import `pygments` third-party library |
23 | 27 |
|
24 | | -# `TYPE_CHECKING` variable is for internal use: |
| 28 | +# Imports `pygments`; using types-Pygments caused ts_utils to have a recuesion error. |
| 29 | +docutils.writers.odf_odt.pygmentsformatter |
| 30 | + |
| 31 | +# Docutils defines `TYPE_CHECKING` instead of importing it. |
25 | 32 | docutils.*\.TYPE_CHECKING |
| 33 | + |
| 34 | +# stubtest infers `dict[Any, Any]` for the optional keyword arguments. |
| 35 | +# That obviously fails to match `_OptionKwargs`. |
| 36 | +docutils\..*\.settings_spec |
| 37 | + |
| 38 | +# Not generic at runtime, but it is runtime subscriptable via `__class_getitem__()`. |
| 39 | +# Take advantage by treating it like a proper generic. |
| 40 | +docutils.languages.LanguageImporter.__class_getitem__ |
| 41 | + |
| 42 | +# These are functions defined in the class bodies without `self`. |
| 43 | +# They are only meant to be accessed via the class (e.g. in `option_spec`); |
| 44 | +# When docutils drops 3.9 support, they should theoretically be real staticmethods. |
| 45 | +docutils.parsers.rst.directives.images.Figure.align |
| 46 | +docutils.parsers.rst.directives.images.Figure.figwidth_value |
| 47 | +docutils.parsers.rst.directives.images.Image.align |
| 48 | +docutils.parsers.rst.directives.images.Image.loading |
| 49 | +docutils.parsers.rst.directives.parts.Contents.backlinks |
| 50 | + |
| 51 | +# These are aliased to `invalid_input(), with defaulted parameters, at runtime. |
| 52 | +# Subclasses must explicitly re-enable. This causes unavoidable signature conflicts. |
| 53 | +# The stub keeps the expected transition signatures so that subclasses may override without errors. |
| 54 | +docutils.parsers.rst.states.SpecializedBody.(anonymous|bullet|doctest|enumerator|explicit_markup|field_marker|grid_table_top|indent|line|line_block|option_marker|simple_table_top|text) |
| 55 | +docutils.parsers.rst.states.SpecializedText.(blank|indent|text|underline) |
| 56 | + |
| 57 | +# This is mutated at runtime. It is `None` at class level, and |
| 58 | +# once `Reader.read()` is called, it is no longer None. |
| 59 | +# `Reader.document` has no real good reason to be accessed before calling `read`, and |
| 60 | +# annotating as "| None" is an unnecessary nuissance. |
| 61 | +docutils.readers.standalone.Reader.document |
0 commit comments