ixbrl-viewer 1.4.30__py3-none-any.whl → 1.4.33__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ixbrl-viewer might be problematic. Click here for more details.

@@ -21,7 +21,7 @@ from .constants import CONFIG_COPY_SCRIPT, CONFIG_FEATURE_PREFIX, CONFIG_LAUNCH_
21
21
  CONFIG_SCRIPT_URL, DEFAULT_COPY_SCRIPT, DEFAULT_LAUNCH_ON_LOAD, DEFAULT_OUTPUT_NAME, \
22
22
  DEFAULT_JS_FILENAME, DEFAULT_VIEWER_PATH, ERROR_MESSAGE_CODE, \
23
23
  EXCEPTION_MESSAGE_CODE, FEATURE_CONFIGS
24
- from .iXBRLViewer import IXBRLViewerBuilder, IXBRLViewerBuilderError
24
+ from .iXBRLViewer import IXBRLViewerBuilder, IXBRLViewerBuilderError, isInlineDoc
25
25
  from .plugin import IXBRLViewerPluginData
26
26
 
27
27
  PLUGIN_NAME = 'ixbrl-viewer'
@@ -116,7 +116,8 @@ def resetPluginData(cntlr: Cntlr):
116
116
 
117
117
  def processModel(cntlr: Cntlr, modelXbrl: ModelXbrl):
118
118
  try:
119
- pluginData(cntlr).builder.processModel(modelXbrl)
119
+ if isInlineDoc(modelXbrl.modelDocument):
120
+ pluginData(cntlr).builder.processModel(modelXbrl)
120
121
  except IXBRLViewerBuilderError as ex:
121
122
  print(ex)
122
123
  except Exception as ex:
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.4.30'
16
- __version_tuple__ = version_tuple = (1, 4, 30)
15
+ __version__ = version = '1.4.33'
16
+ __version_tuple__ = version_tuple = (1, 4, 33)
@@ -15,7 +15,7 @@ from copy import deepcopy
15
15
  from pathlib import Path
16
16
 
17
17
  from arelle import XbrlConst
18
- from arelle.ModelDocument import Type
18
+ from arelle.ModelDocument import ModelDocument, Type
19
19
  from arelle.ModelRelationshipSet import ModelRelationshipSet
20
20
  from arelle.ModelValue import QName, INVALIDixVALUE
21
21
  from arelle.ModelXbrl import ModelXbrl
@@ -79,6 +79,9 @@ class NamespaceMap:
79
79
  class IXBRLViewerBuilderError(Exception):
80
80
  pass
81
81
 
82
+ def isInlineDoc(doc: ModelDocument | None) -> bool:
83
+ return doc is not None and doc.type in {Type.INLINEXBRL, Type.INLINEXBRLDOCUMENTSET}
84
+
82
85
  class IXBRLViewerBuilder:
83
86
 
84
87
  def __init__(self,
@@ -402,10 +405,9 @@ class IXBRLViewerBuilder:
402
405
  self.currentTargetReport = self.newTargetReport(getattr(report, "ixdsTarget", None))
403
406
  softwareCredits = set()
404
407
  for document in report.urlDocs.values():
405
- if document.type not in (Type.INLINEXBRL, Type.INLINEXBRLDOCUMENTSET):
406
- continue
407
- matches = document.creationSoftwareMatches(document.creationSoftwareComment)
408
- softwareCredits.update(matches)
408
+ if isInlineDoc(document):
409
+ matches = document.creationSoftwareMatches(document.creationSoftwareComment)
410
+ softwareCredits.update(matches)
409
411
  if softwareCredits:
410
412
  self.currentTargetReport["softwareCredits"] = list(softwareCredits)
411
413
  for f in report.facts: