pyTooling.Sphinx.Workaround

Workarounds for Sphinx and docutils problems.

Classes

  • FixLatexTableWidths: A post-transform giving the report tables in LaTeX the column widths their directives state.


Classes

class pyTooling.Sphinx.Workaround.FixLatexTableWidths(document, startnode=None)[source]

A post-transform giving the report tables in LaTeX the column widths their directives state.

Without class colwidths-given, Sphinx’ LaTeX writer computes the widths itself and ignores the ones the table’s column specifications state, which squeezes a wide table - such as a unit test or code coverage report - into the page.

Inheritance

Inheritance diagram of FixLatexTableWidths

default_priority = 500

Priority among the post-transforms.

formats: tuple[str, ...] = ('latex',)

Output formats the transform runs for.

tableClasses = ('report-unittest-table', 'report-codecov-table')

CSS classes of the tables it fixes.

run(**kwargs)[source]

Add class colwidths-given to every report table that hasn’t it yet.

Parameters:

kwargs (Any) – Keyword arguments Sphinx passes to a post-transform; none is used.

Return type:

None

__init__(document, startnode=None)

Initial setup for in-place document transforms.

Return type:

None

property app: Sphinx

Reference to the Sphinx object.

apply(**kwargs)

Override to apply the transform to the document tree.

Return type:

None

Parameters:

kwargs (Any)

property config: Config

Reference to the Config object.

property env: BuildEnvironment

Reference to the BuildEnvironment object.

is_supported()

Check this transform working for current builder.

Return type:

bool

document

The document tree to transform.

startnode

Node from which to begin the transform. For many transforms which apply to the document as a whole, startnode is not set (i.e. its value is None).

language

Language module local to this document.