mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix typehints: sphinx.io
This commit is contained in:
parent
1562682c8b
commit
545bb77b1e
@ -41,7 +41,7 @@ from sphinx.versioning import UIDTransform
|
|||||||
|
|
||||||
if False:
|
if False:
|
||||||
# For type annotation
|
# For type annotation
|
||||||
from typing import Any, Dict, List, Tuple, Union # NOQA
|
from typing import Any, Dict, List, Tuple, Type, Union # NOQA
|
||||||
from docutils import nodes # NOQA
|
from docutils import nodes # NOQA
|
||||||
from docutils.io import Input # NOQA
|
from docutils.io import Input # NOQA
|
||||||
from docutils.parsers import Parser # NOQA
|
from docutils.parsers import Parser # NOQA
|
||||||
@ -69,7 +69,7 @@ class SphinxBaseReader(standalone.Reader):
|
|||||||
standalone.Reader.__init__(self, *args, **kwargs)
|
standalone.Reader.__init__(self, *args, **kwargs)
|
||||||
|
|
||||||
def get_transforms(self):
|
def get_transforms(self):
|
||||||
# type: () -> List[Transform]
|
# type: () -> List[Type[Transform]]
|
||||||
return standalone.Reader.get_transforms(self) + self.transforms
|
return standalone.Reader.get_transforms(self) + self.transforms
|
||||||
|
|
||||||
def new_document(self):
|
def new_document(self):
|
||||||
@ -101,7 +101,7 @@ class SphinxStandaloneReader(SphinxBaseReader):
|
|||||||
UnreferencedFootnotesDetector, SphinxSmartQuotes, ManpageLink,
|
UnreferencedFootnotesDetector, SphinxSmartQuotes, ManpageLink,
|
||||||
SphinxDomains, SubstitutionDefinitionsRemover, DoctreeReadEvent,
|
SphinxDomains, SubstitutionDefinitionsRemover, DoctreeReadEvent,
|
||||||
UIDTransform,
|
UIDTransform,
|
||||||
] # type: List[Transform]
|
] # type: List[Type[Transform]]
|
||||||
|
|
||||||
def __init__(self, app, *args, **kwargs):
|
def __init__(self, app, *args, **kwargs):
|
||||||
# type: (Sphinx, Any, Any) -> None
|
# type: (Sphinx, Any, Any) -> None
|
||||||
@ -123,7 +123,7 @@ class SphinxI18nReader(SphinxBaseReader):
|
|||||||
AutoNumbering, SortIds, RemoveTranslatableInline,
|
AutoNumbering, SortIds, RemoveTranslatableInline,
|
||||||
FilterSystemMessages, RefOnlyBulletListTransform,
|
FilterSystemMessages, RefOnlyBulletListTransform,
|
||||||
UnreferencedFootnotesDetector, SphinxSmartQuotes, ManpageLink,
|
UnreferencedFootnotesDetector, SphinxSmartQuotes, ManpageLink,
|
||||||
SubstitutionDefinitionsRemover]
|
SubstitutionDefinitionsRemover] # type: List[Type[Transform]]
|
||||||
|
|
||||||
def set_lineno_for_reporter(self, lineno):
|
def set_lineno_for_reporter(self, lineno):
|
||||||
# type: (int) -> None
|
# type: (int) -> None
|
||||||
|
Loading…
Reference in New Issue
Block a user