arelle.utils.validate.Facts¶
See COPYRIGHT.md for copyright information.
Module Contents¶
Functions¶
Returns True if the fact has the xsi:nil attribute set (regardless of value). |
|
Returns True if the fact has the precision attribute explicitly set. Checks the raw attribute value, not the effective precision from type defaults. |
|
Returns True if the fact is a string item type concept with an empty value. |
|
Returns True if fact is valid (xValid >= VALID) and non-nil. |
|
Returns True if fact is valid and has a negative numeric value. |
|
Groups facts by their concept/context/unit hash. Returns a mapping of hash to list of facts. Used by validation rules that detect duplicate facts based on concept, context, and unit. |
|
Yields facts with the given QName that are valid and non-nil. |
|
Returns True if at least one valid, non-nil fact exists for the given QName. |
|
Returns the set of concepts used on facts in the instance. |
|
Returns True if a fact with the given concept key is tagged with a non-nil, valid value. conceptKey is QName or str (localName). |
|
Returns the list of facts with the given concept key that have a negative value. conceptKey is QName when byQname=True, else str (localName). |
Data¶
API¶
- arelle.utils.validate.Facts.XSI_NIL_ATTR¶
‘{http://www.w3.org/2001/XMLSchema-instance}nil’
- arelle.utils.validate.Facts.factHasXsiNilAttribute(fact: arelle.ModelInstanceObject.ModelFact) bool¶
Returns True if the fact has the xsi:nil attribute set (regardless of value).
- arelle.utils.validate.Facts.factHasPrecisionAttribute(fact: arelle.ModelInstanceObject.ModelFact) bool¶
Returns True if the fact has the precision attribute explicitly set. Checks the raw attribute value, not the effective precision from type defaults.
- arelle.utils.validate.Facts.isEmptyStringItemFact(fact: arelle.ModelInstanceObject.ModelFact) bool¶
Returns True if the fact is a string item type concept with an empty value.
- arelle.utils.validate.Facts.isValidNonNilFact(fact: arelle.ModelInstanceObject.ModelFact) bool¶
Returns True if fact is valid (xValid >= VALID) and non-nil.
- arelle.utils.validate.Facts.factHasNegativeNumericValue(fact: arelle.ModelInstanceObject.ModelFact) bool¶
Returns True if fact is valid and has a negative numeric value.
- arelle.utils.validate.Facts.getDuplicateFactGroupsByConceptContextUnit(facts: collections.abc.Iterable[arelle.ModelInstanceObject.ModelFact]) dict[object, list[arelle.ModelInstanceObject.ModelFact]]¶
Groups facts by their concept/context/unit hash. Returns a mapping of hash to list of facts. Used by validation rules that detect duplicate facts based on concept, context, and unit.
- arelle.utils.validate.Facts.iterValidNonNilFactsByQname(modelXbrl: arelle.ModelXbrl.ModelXbrl, qname: arelle.ModelValue.QName) collections.abc.Iterable[arelle.ModelInstanceObject.ModelFact]¶
Yields facts with the given QName that are valid and non-nil.
- arelle.utils.validate.Facts.hasValidNonNilFactByQname(modelXbrl: arelle.ModelXbrl.ModelXbrl, qname: arelle.ModelValue.QName) bool¶
Returns True if at least one valid, non-nil fact exists for the given QName.
- arelle.utils.validate.Facts.getUsedConceptsFromFacts(modelXbrl: arelle.ModelXbrl.ModelXbrl) set[arelle.ModelDtsObject.ModelConcept]¶
Returns the set of concepts used on facts in the instance.
- arelle.utils.validate.Facts.hasNonNillFact(modelXbrl: arelle.ModelXbrl.ModelXbrl, conceptKey: Union[arelle.ModelValue.QName, str]) bool¶
Returns True if a fact with the given concept key is tagged with a non-nil, valid value. conceptKey is QName or str (localName).
- arelle.utils.validate.Facts.getNegativeFacts(modelXbrl: arelle.ModelXbrl.ModelXbrl, conceptKey: Union[arelle.ModelValue.QName, str]) list[arelle.ModelInstanceObject.ModelFact]¶
Returns the list of facts with the given concept key that have a negative value. conceptKey is QName when byQname=True, else str (localName).