本文整理汇总了Python中arelle.ValidateXbrlDimensions.checkBaseSet方法的典型用法代码示例。如果您正苦于以下问题:Python ValidateXbrlDimensions.checkBaseSet方法的具体用法?Python ValidateXbrlDimensions.checkBaseSet怎么用?Python ValidateXbrlDimensions.checkBaseSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类arelle.ValidateXbrlDimensions
的用法示例。
在下文中一共展示了ValidateXbrlDimensions.checkBaseSet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: validate
# 需要导入模块: from arelle import ValidateXbrlDimensions [as 别名]
# 或者: from arelle.ValidateXbrlDimensions import checkBaseSet [as 别名]
#.........这里部分代码省略.........
targetNumericDecorator="" if toConcept.isNumeric else _(" (non-numeric)"))
# check presentation relationships for preferredLabel issues
elif arcrole == XbrlConst.parentChild:
for modelRel in relsSet.modelRelationships:
preferredLabel = modelRel.preferredLabel
toConcept = modelRel.toModelObject
if preferredLabel is not None and toConcept is not None and \
toConcept.label(preferredLabel=preferredLabel,fallbackToQname=False) is None:
modelXbrl.error("xbrl.5.2.4.2.1:preferredLabelMissing",
_("Presentation relationship from %(source)s to %(target)s in link role %(linkrole)s missing preferredLabel %(preferredLabel)s"),
modelObject=modelRel,
source=modelRel.fromModelObject.qname, target=toConcept.qname, linkrole=ELR,
preferredLabel=preferredLabel)
# check essence-alias relationships
elif arcrole == XbrlConst.essenceAlias:
for modelRel in relsSet.modelRelationships:
fromConcept = modelRel.fromModelObject
toConcept = modelRel.toModelObject
if fromConcept is not None and toConcept is not None:
if fromConcept.type != toConcept.type or fromConcept.periodType != toConcept.periodType:
modelXbrl.error("xbrl.5.2.6.2.2:essenceAliasTypes",
_("Essence-alias relationship from %(source)s to %(target)s in link role %(linkrole)s has different types or periodTypes"),
modelObject=modelRel,
source=fromConcept.qname, target=toConcept.qname, linkrole=ELR)
fromBalance = fromConcept.balance
toBalance = toConcept.balance
if fromBalance and toBalance:
if fromBalance and toBalance and fromBalance != toBalance:
modelXbrl.error("xbrl.5.2.6.2.2:essenceAliasBalance",
_("Essence-alias relationship from %(source)s to %(target)s in link role %(linkrole)s has different balances")).format(
modelObject=modelRel,
source=fromConcept.qname, target=toConcept.qname, linkrole=ELR)
elif modelXbrl.hasXDT and arcrole.startswith(XbrlConst.dimStartsWith):
ValidateXbrlDimensions.checkBaseSet(self, arcrole, ELR, relsSet)
elif (modelXbrl.hasFormulae or modelXbrl.hasTableRendering) and arcrole.startswith(XbrlConst.formulaStartsWith):
ValidateFormula.checkBaseSet(self, arcrole, ELR, relsSet)
modelXbrl.isDimensionsValidated = True
modelXbrl.profileStat(_("validateRelationships"))
# instance checks
modelXbrl.modelManager.showStatus(_("validating instance"))
self.footnoteRefs = set()
if modelXbrl.modelDocument.type == ModelDocument.Type.INSTANCE or \
modelXbrl.modelDocument.type == ModelDocument.Type.INLINEXBRL:
self.factsWithDeprecatedIxNamespace = []
self.checkFacts(modelXbrl.facts)
if self.factsWithDeprecatedIxNamespace:
self.modelXbrl.info("arelle:info",
_("%(count)s facts have deprecated transformation namespace %(namespace)s"),
modelObject=self.factsWithDeprecatedIxNamespace,
count=len(self.factsWithDeprecatedIxNamespace),
namespace=FunctionIxt.deprecatedNamespaceURI)
del self.factsWithDeprecatedIxNamespace
#instance checks
for cntx in modelXbrl.contexts.values():
if cntx.isStartEndPeriod:
try:
if cntx.endDatetime <= cntx.startDatetime:
self.modelXbrl.error("xbrl.4.7.2:periodStartBeforeEnd",
_("Context %(contextID)s must have startDate less than endDate"),
modelObject=cntx, contextID=cntx.id)
except (TypeError, ValueError) as err:
self.modelXbrl.error("xbrl.4.7.2:contextDateError",