arelle.ValidateXbrlCalcs#

See COPYRIGHT.md for copyright information.

Module Contents#

Classes#

Functions#

init

rangeToStr

validate

roundFact

decimalRound

inferredPrecision

inferredDecimals

roundValue

rangeValue

insignificantDigits

wrappedFactWithWeight

wrappedSummationAndItems

ARELLE-281, replace: faster python-based hash (replace with hashlib for fewer collisions) itemValuesHash = hash( tuple(( hash(b.modelObject.qname), hash(b.extraProperties[1][1]) ) # sort by qname so we don’t care about reordering of summation terms for b in sorted(boundSummationItems, key=lambda b: b.modelObject.qname)) ) sumValueHash = hash( (hash(fact.qname), hash(roundedSum)) )

Data#

API#

arelle.ValidateXbrlCalcs.init()#
class arelle.ValidateXbrlCalcs.ValidateCalcsMode#
NONE#

0

XBRL_v2_1_INFER_PRECISION#

1

XBRL_v2_1#

2

XBRL_v2_1_DEDUPLICATE#

3

ROUND_TO_NEAREST#

4

TRUNCATION#

5

static label(enum)#
static menu()#
arelle.ValidateXbrlCalcs.oimXbrlxeBlockingErrorCodes#

None

arelle.ValidateXbrlCalcs.numberPattern#

‘re_compile(…)’

arelle.ValidateXbrlCalcs.ZERO#

‘Decimal(…)’

arelle.ValidateXbrlCalcs.ONE#

‘Decimal(…)’

arelle.ValidateXbrlCalcs.TWO#

‘Decimal(…)’

arelle.ValidateXbrlCalcs.TEN#

‘Decimal(…)’

arelle.ValidateXbrlCalcs.NaN#

‘Decimal(…)’

arelle.ValidateXbrlCalcs.floatNaN#

‘float(…)’

arelle.ValidateXbrlCalcs.floatINF#

‘float(…)’

arelle.ValidateXbrlCalcs.INCONSISTENT#

inconsistent

arelle.ValidateXbrlCalcs.NIL_FACT_SET#

nilFactSet

arelle.ValidateXbrlCalcs.ZERO_RANGE#

(0, 0, True, True)

arelle.ValidateXbrlCalcs.EMPTY_SET#

‘set(…)’

arelle.ValidateXbrlCalcs.rangeToStr(a, b, inclA, inclB) str#
arelle.ValidateXbrlCalcs.validate(modelXbrl, validateCalcs) None#
class arelle.ValidateXbrlCalcs.ValidateXbrlCalcs(modelXbrl, validateCalcs)#

Initialization

validate()#
bindFacts(facts, ancestors)#
consistentFactValueInterval(fList, truncate=False) tuple[decimal.Decimal | str, decimal.Decimal | str, bool, bool]#
arelle.ValidateXbrlCalcs.roundFact(fact, inferDecimals=False, vDecimal=None)#
arelle.ValidateXbrlCalcs.decimalRound(x, d, rounding)#
arelle.ValidateXbrlCalcs.inferredPrecision(fact)#
arelle.ValidateXbrlCalcs.inferredDecimals(fact: arelle.ModelInstanceObject.ModelFact) float | int#
arelle.ValidateXbrlCalcs.roundValue(value, precision=None, decimals=None, scale=None)#
arelle.ValidateXbrlCalcs.rangeValue(value, decimals=None, truncate=False) tuple[decimal.Decimal, decimal.Decimal, bool, bool]#
arelle.ValidateXbrlCalcs.insignificantDigits(value: arelle.ModelValue.TypeXValue, decimals: int | float | _decimal.Decimal | str) tuple[_decimal.Decimal, _decimal.Decimal] | None#
arelle.ValidateXbrlCalcs.wrappedFactWithWeight(fact, weight, roundedValue)#
arelle.ValidateXbrlCalcs.wrappedSummationAndItems(fact, roundedSum, boundSummationItems)#

ARELLE-281, replace: faster python-based hash (replace with hashlib for fewer collisions) itemValuesHash = hash( tuple(( hash(b.modelObject.qname), hash(b.extraProperties[1][1]) ) # sort by qname so we don’t care about reordering of summation terms for b in sorted(boundSummationItems, key=lambda b: b.modelObject.qname)) ) sumValueHash = hash( (hash(fact.qname), hash(roundedSum)) )