class _CachedEpydocLinker(_EpydocLinker): (source)
Known subclasses: pydoctor.test.test_epydoc2stan._TestCachedEpydocLinker
This linker implements smart caching functionalities on top of public methods defined in _EpydocLinker
.
The cache is implemented at the Tag
(Stan) level, letting us do transformation over cached Tag
instances and recycle already resolved URLs and adjust them to change formatting as requested by link_xref().
Class |
|
Undocumented |
Exception |
|
Undocumented |
Method | __init__ |
Undocumented |
Method | link |
Format a link to a Python identifier. This will resolve the identifier like Python itself would. |
Method | link |
Format a cross-reference link to a Python identifier. This will resolve the identifier to any reasonable target, even if it has to look in places where Python itself would not. |
Method | _adjust |
Undocumented |
Method | _get |
Undocumented |
Method | _lookup |
Undocumented |
Method | _lookup |
Undocumented |
Method | _lookup |
Undocumented |
Method | _new |
Undocumented |
Method | _store |
Undocumented |
Type Alias | _ |
Undocumented |
Class Variable | _default |
Undocumented |
Instance Variable | _link |
Undocumented |
Instance Variable | _link |
Undocumented |
Inherited from _EpydocLinker
:
Exception |
|
Encapsulate a link tag that is not actually a link because we count not resolve the name. |
Method | disable |
By default, when linkng to an object on the same page, the linker will generate an URL that links to the anchor only, this will avoid reloading the page needlessly. But sometimes we're using a linker to present the content on another page... |
Method | look |
Return link for `name` based on intersphinx inventory. |
Method | look |
Undocumented |
Method | resolve |
Resolve a Python identifier. This will resolve the identifier like Python itself would. |
Instance Variable | obj |
Undocumented |
Instance Variable | same |
Undocumented |
Instance Variable | strict |
Undocumented |
Static Method | _create |
Create a link with the special 'intersphinx-link' CSS class. |
Method | _resolve |
Resolve a crossreference link to a Python identifier. This will resolve the identifier to any reasonable target, even if it has to look in places where Python itself would not. |
pydoctor.linker._EpydocLinker.__init__
pydoctor.test.test_epydoc2stan._TestCachedEpydocLinker
Undocumented
Parameters | |
obj:model.Documentable | Undocumented |
samebool | Undocumented |
pydoctor.linker._EpydocLinker.link_to
pydoctor.test.test_epydoc2stan._TestCachedEpydocLinker
Format a link to a Python identifier. This will resolve the identifier like Python itself would.
Parameters | |
target:str | The name of the Python identifier that should be linked to. |
label:Flattenable | The label to show for the link. |
Returns | |
Tag | The link, or just the label if the target was not found. |
pydoctor.linker._EpydocLinker.link_xref
pydoctor.test.test_epydoc2stan._TestCachedEpydocLinker
Format a cross-reference link to a Python identifier. This will resolve the identifier to any reasonable target, even if it has to look in places where Python itself would not.
Parameters | |
target:str | The name of the Python identifier that should be linked to. |
label:Flattenable | The label to show for the link. |
lineno:int | The line number within the docstring at which the crossreference is located. |
Returns | |
Tag | The link, or just the label if the target was not found. In either case, the returned top-level tag will be <code>. |
Undocumented
Parameters | |
cacheLiteral[ | Undocumented |
Returns | |
_CachedEpydocLinker._CacheType | Undocumented |
Undocumented
Parameters | |
target:str | Undocumented |
label:Flattenable | Undocumented |
cacheLiteral[ | Undocumented |
Returns | |
Optional[ | Undocumented |
Undocumented
Parameters | |
target:str | Undocumented |
label:Flattenable | Undocumented |
Returns | |
Optional[ | Undocumented |
Undocumented
Parameters | |
target:str | Undocumented |
label:Flattenable | Undocumented |
lineno:int | Undocumented |
Returns | |
Optional[ | Undocumented |
Undocumented
Parameters | |
cached_CachedEpydocLinker.CacheEntry | Undocumented |
label:Optional[ | Undocumented |
cacheLiteral[ | Undocumented |
Returns | |
_CachedEpydocLinker.CacheEntry | Undocumented |
Undocumented
Parameters | |
target:str | Undocumented |
label:Flattenable | Undocumented |
link:Tag | Undocumented |
cacheLiteral[ | Undocumented |
lookupbool | Undocumented |
warnedOptional[ | Undocumented |
Returns | |
_CachedEpydocLinker.CacheEntry | Undocumented |