mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #5671 from tk0miya/refactor_Reader
Fix SphinxBaseReader.get_transform() refers an attribute of subclasses
This commit is contained in:
commit
1e50946364
@ -64,6 +64,8 @@ class SphinxBaseReader(standalone.Reader):
|
||||
This replaces reporter by Sphinx's on generating document.
|
||||
"""
|
||||
|
||||
transforms = [] # type: List[Type[Transform]]
|
||||
|
||||
def __init__(self, app, *args, **kwargs):
|
||||
# type: (Sphinx, Any, Any) -> None
|
||||
self.env = app.env
|
||||
@ -101,8 +103,7 @@ class SphinxStandaloneReader(SphinxBaseReader):
|
||||
RemoveTranslatableInline, FilterSystemMessages, RefOnlyBulletListTransform,
|
||||
UnreferencedFootnotesDetector, SphinxSmartQuotes, ManpageLink,
|
||||
SphinxDomains, SubstitutionDefinitionsRemover, DoctreeReadEvent,
|
||||
UIDTransform,
|
||||
] # type: List[Type[Transform]]
|
||||
UIDTransform]
|
||||
|
||||
def __init__(self, app, *args, **kwargs):
|
||||
# type: (Sphinx, Any, Any) -> None
|
||||
@ -124,7 +125,7 @@ class SphinxI18nReader(SphinxBaseReader):
|
||||
AutoNumbering, SortIds, RemoveTranslatableInline,
|
||||
FilterSystemMessages, RefOnlyBulletListTransform,
|
||||
UnreferencedFootnotesDetector, SphinxSmartQuotes, ManpageLink,
|
||||
SubstitutionDefinitionsRemover] # type: List[Type[Transform]]
|
||||
SubstitutionDefinitionsRemover]
|
||||
|
||||
def set_lineno_for_reporter(self, lineno):
|
||||
# type: (int) -> None
|
||||
|
Loading…
Reference in New Issue
Block a user