champollion.directive.js_data

class champollion.directive.js_data.AutoDataDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

Directive to render Javascript data documentation.

The unique argument should be the identifier of the data element.

.. js:autodata:: module.DATA

The available options are:

  • alias:
    String element to replace the data name.
  • module-alias:
    String element to replace the module name.
  • module-path-alias:
    String element to replace the module path.
  • force-partial-import:
    Indicate whether the data import statement display should be indicated with partial import if the data element is exported.
  • skip-value:
    Indicate whether data value should be skipped.

See also

Using autodata

has_arguments = False

Javascript data are not callable

objtype = 'data'

Define the Object type

option_spec = {'alias': <function unchanged_required>, 'force-partial-import': <function <lambda>>, 'module-alias': <function unchanged_required>, 'module-path-alias': <function unchanged_required>, 'skip-value': <function <lambda>>}

data options

handle_signature(signature, node)[source]

Update the signature node.

before_content()[source]

Update the content.

Compute the description and import statement if available.