varst.utils.substitution module#

class varst.utils.substitution.Substitution(rst_file: RstFile)#

Bases: object

find(name) str#

Find substitution text by name.

Parameters:

name – The string value of substitution name.

Returns:

The string value of substitution text.

Return type:

substitution_text

Raises:

KeyError – If substitution is not in file.

update(name, value)#

Update substitution text with name to value.

Parameters:
  • name – The string value of substitution name.

  • value – The string value of substitution text.

varst.utils.substitution.substitution_text(name, value) str#