pipeline.domain.unitformat.UnitFormat

class UnitFormat(prefer_integers=False)[source]

Bases: object

Methods

addUnitOfMagnitude

Adds a unit to this format.

bestUnitForObject

format

html

addUnitOfMagnitude(magnitude, format, html=None)[source]

Adds a unit to this format. For example, to add support for centimetres to a UnitFormat of metric length, use magnitude of 0.01d (ie 1/100th of a metre) and number format '###0.# cm'.