Undocumented
Class |
|
A simple inventory implementation which has an in-memory API link mapping. |
Class |
|
A DocstringLinker implementation that cannot find any links, but does record which identifiers it was asked to link. |
Function | docstring2html |
Undocumented |
Function | insert |
Undocumented |
Function | summary2html |
Undocumented |
Function | test |
Perform two checks on the annotation formatting: |
Function | test_ |
The CachedEpydocLinker returns the same Tag object without resolving the name and re-creating the link tag all the time. |
Function | test_ |
When _CachedEpydocLinker.same_page_optimization is True, the linker will create URLs with only the anchor if we're lnking to an object on the same page. |
Function | test_ |
Warnings should be reported only once per invalid name per line, no matter the number of times we call summary2html() or docstring2html() or the order we call these functions. |
Function | test |
When System.options.docformat is set to plaintext it overwrites any specific Module.docformat defined for a module. |
Function | test |
Test epydoc2stan.format_constant_value(). |
Function | test |
Constructor parameters can be documented on the class. |
Function | test_ |
The EpydocLinker return a link with the CSS class 'intersphinx-link' when it's using intersphinx. |
Function | test_ |
Return the link from inventory based on first package name. |
Function | test_ |
Return None if inventory had no link for our markup. |
Function | test_ |
Link to an internal object referenced by its full name. |
Function | test_ |
Returns the link from Sphinx inventory based on a cross reference ID specified in absolute dotted path and with a custom pretty text for the URL. |
Function | test_ |
A message is sent to stdout when no link could be found for the reference, while returning the reference name without an A link tag. The message contains the full name under which the reference was resolved... |
Function | test_ |
Return the link from inventory using short names, by resolving them based on the imports done in the module. |
Function | test_ |
Check that the best match is picked when there are multiple candidates. |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Do not warn when a subclass method lacks parameters that are documented in an inherited docstring. |
Function | test |
Undocumented |
Function | test |
Param and type fields must include the name of the parameter. |
Function | test |
Warn about documented parameters that don't exist in the definition. |
Function | test |
Warn exactly once about a param/type combination not existing. |
Function | test |
Warn when a parameter is documented as a @keyword. |
Function | test |
Warn when the same parameter is documented more than once. |
Function | test |
Raise fields are formatted by linking the exception type. |
Function | test |
When a raise field is missing the exception type, a warning is logged and the HTML will list the exception type as unknown. |
Function | test |
Var-args can be named in fields with or without asterixes. Constructor parameters can be documented on the class. |
Function | test |
Star arguments, even if there are not named 'args' or 'kwargs', are recognized. |
Function | test |
Star arguments, even if there are not docstring attached, will be rendered with stars. |
Function | test |
When the returned value is undocumented (no 'return' field) and its type annotation is None, omit the "Returns" entry from the output. |
Function | test |
When the returned value is undocumented (no 'return' field) and its type annotation is not None, include the "Returns" entry in the output. |
Function | test |
Undocumented |
Function | test |
Warn if a name is given for a type field in a variable docstring. A variable docstring only documents a single variable, so the name is redundant at best and misleading at worst. |
Function | test |
The type field in a variable docstring updates the parsed_type of the Attribute it documents. |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
No break points are introduced for values containing a single world. |
Function | test |
Undocumented |
Function | test |
An 'ivar' field in a subclass overrides a docstring for the same attribute set in the base class. |
Function | test |
Undocumented |
Function | test |
Do not warn if a parameter might be added by a computed base class. |
Function | test |
Test if Module.docformat effectively override System.options.docformat |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test |
'self' and 'cls' in parameter table of regular function should appear because we don't know if it's a badly named argument OR it's actually assigned to a legit class/instance method outside of the class scope: https://github... |
Function | test |
Undocumented |
Function | test |
Undocumented |
Function | test_ |
A test case for the testing linker _TestCachedEpydocLinker . The test linker is initialized with a maximum number of non-cached requests it can make and an AssertionError is raised if it makes too many requests. |
Function | test |
Warn when field arguments that should be empty aren't. |
Function | test |
Undocumented |
Function | test |
Test if the :warns: field is correctly recognized. |
Function | test |
A linked name that is documented in another project is linked using an absolute URL (retrieved via Intersphinx). |
Function | test |
A linked name that is not found is output as text. |
Function | test |
A linked name that is documented on a different page but within the same project is linked using a relative URL. |
Function | test |
A linked name that is documented on the same page is linked using only a fragment as the URL. But that does not happend in summaries. |
Function | test |
When a link in an epytext docstring cannot be resolved, the reference and the line number of the link should be reported. |
Function | test |
When a link in an reStructedText docstring cannot be resolved, the reference and the line number of the link should be reported. |
Function | test |
When an invalid link is in the middle of a paragraph, we still report the right line number. |
Function | test |
Test if the :warns: field is correctly recognized. |
Class | _ |
Docstring linker for testing the caching of results. |
Undocumented
Parameters | |
obj:model.Documentable | Undocumented |
docformat:Optional[ | Undocumented |
Returns | |
str | Undocumented |
def test_annotation_formatting(annotation): (source) ¶
Perform two checks on the annotation formatting:
- all type names in the annotation are passed to the linker
- the plain text version of the output matches the input
Parameters | |
annotation:str | Undocumented |
Note | |
The annotation formatting is now handled by PyvalColorizer . We use the function flatten_text in order to back reproduce the original text annotations. |
The CachedEpydocLinker returns the same Tag object without resolving the name and re-creating the link tag all the time.
When _CachedEpydocLinker.same_page_optimization is True, the linker will create URLs with only the anchor if we're lnking to an object on the same page.
Otherwise it will always use return a URL with a filename, this is used to generate the summaries.
Warnings should be reported only once per invalid name per line, no matter the number of times we call summary2html() or docstring2html() or the order we call these functions.
Parameters | |
capsys:CapSys | Undocumented |
When System.options.docformat is set to plaintext it overwrites any specific Module.docformat defined for a module.
See https://github.com/twisted/pydoctor/issues/503 for the reason of this behavior.
Parameters | |
capsys:CapSys | Undocumented |
Returns the link from Sphinx inventory based on a cross reference ID specified in absolute dotted path and with a custom pretty text for the URL.
A message is sent to stdout when no link could be found for the reference, while returning the reference name without an A link tag. The message contains the full name under which the reference was resolved. FIXME: Use a proper logging system instead of capturing stdout. https://github.com/twisted/pydoctor/issues/112
Parameters | |
capsys:CapSys | Undocumented |
Return the link from inventory using short names, by resolving them based on the imports done in the module.
Check that the best match is picked when there are multiple candidates.
Parameters | |
capsys:CapSys | Undocumented |
Do not warn when a subclass method lacks parameters that are documented in an inherited docstring.
Parameters | |
capsys:CapSys | Undocumented |
When a raise field is missing the exception type, a warning is logged and the HTML will list the exception type as unknown.
Parameters | |
capsys:CapSys | Undocumented |
Var-args can be named in fields with or without asterixes. Constructor parameters can be documented on the class.
Parameters | |
capsys:CapSys | Undocumented |
Note | |
Asterixes need to be escaped with reStructuredText. |
Star arguments, even if there are not named 'args' or 'kwargs', are recognized.
Parameters | |
capsys:CapSys | Undocumented |
Star arguments, even if there are not docstring attached, will be rendered with stars.
Parameters | |
capsys:CapSys | Undocumented |
Note | |
This test might not pass anymore when we include the annotations inside the signatures. |
When the returned value is undocumented (no 'return' field) and its type annotation is None, omit the "Returns" entry from the output.
When the returned value is undocumented (no 'return' field) and its type annotation is not None, include the "Returns" entry in the output.
Warn if a name is given for a type field in a variable docstring. A variable docstring only documents a single variable, so the name is redundant at best and misleading at worst.
Parameters | |
capsys:CapSys | Undocumented |
The type field in a variable docstring updates the parsed_type of the Attribute it documents.
Parameters | |
capsys:CapSys | Undocumented |
An 'ivar' field in a subclass overrides a docstring for the same attribute set in the base class.
The 'a' attribute in the test code reproduces a regression introduced in pydoctor 20.7.0, where the summary would be constructed from the base class documentation instead. The problem was in the fact that a split field's docstring is stored in 'parsed_docstring', while format_summary() looked there only if no unparsed docstring could be found.
The 'b' attribute in the test code is there to make sure that in the absence of an 'ivar' field, the docstring is inherited.
Do not warn if a parameter might be added by a computed base class.
Parameters | |
capsys:CapSys | Undocumented |
Test if Module.docformat effectively override System.options.docformat
Parameters | |
capsys:CapSys | Undocumented |
'self' and 'cls' in parameter table of regular function should appear because we don't know if it's a badly named argument OR it's actually assigned to a legit class/instance method outside of the class scope: https://github.com/twisted/pydoctor/issues/13
Until issue #13 is fixed (which is not so easy), the safe side is to show them.
Parameters | |
capsys:CapSys | Undocumented |
A test case for the testing linker _TestCachedEpydocLinker
. The test linker is initialized with a maximum number of non-cached requests it can make and an AssertionError is raised if it makes too many requests.
A linked name that is documented in another project is linked using an absolute URL (retrieved via Intersphinx).
A linked name that is documented on a different page but within the same project is linked using a relative URL.
A linked name that is documented on the same page is linked using only a fragment as the URL. But that does not happend in summaries.
When a link in an epytext docstring cannot be resolved, the reference and the line number of the link should be reported.
Parameters | |
capsys:CapSys | Undocumented |
When a link in an reStructedText docstring cannot be resolved, the reference and the line number of the link should be reported.
Parameters | |
capsys:CapSys | Undocumented |
When an invalid link is in the middle of a paragraph, we still report the right line number.
Parameters | |
capsys:CapSys | Undocumented |