arelle-release 2.37.47__py3-none-any.whl → 2.37.49__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 arelle-release might be problematic. Click here for more details.

Files changed (100) hide show
  1. arelle/CntlrCmdLine.py +5 -1
  2. arelle/ModelObjectFactory.py +18 -2
  3. arelle/_version.py +2 -2
  4. arelle/plugin/validate/EDINET/Constants.py +6 -0
  5. arelle/plugin/validate/EDINET/PluginValidationDataExtension.py +134 -7
  6. arelle/plugin/validate/EDINET/Statement.py +139 -0
  7. arelle/plugin/validate/EDINET/rules/contexts.py +5 -10
  8. arelle/plugin/validate/EDINET/rules/edinet.py +89 -51
  9. arelle/plugin/validate/EDINET/rules/gfm.py +41 -0
  10. {arelle_release-2.37.47.dist-info → arelle_release-2.37.49.dist-info}/METADATA +3 -1
  11. {arelle_release-2.37.47.dist-info → arelle_release-2.37.49.dist-info}/RECORD +15 -99
  12. arelle/archive/CustomLogger.py +0 -43
  13. arelle/archive/LoadEFMvalidate.py +0 -32
  14. arelle/archive/LoadSavePreLbCsv.py +0 -26
  15. arelle/archive/LoadValidate.cs +0 -31
  16. arelle/archive/LoadValidate.py +0 -36
  17. arelle/archive/LoadValidateCmdLine.java +0 -69
  18. arelle/archive/LoadValidatePostedZip.java +0 -57
  19. arelle/archive/LoadValidateWebService.java +0 -34
  20. arelle/archive/SaveTableToExelle.py +0 -140
  21. arelle/archive/TR3toTR4.py +0 -88
  22. arelle/archive/plugin/ESEF_2022/__init__.py +0 -47
  23. arelle/archive/plugin/bigInstance.py +0 -394
  24. arelle/archive/plugin/cmdWebServerExtension.py +0 -43
  25. arelle/archive/plugin/crashTest.py +0 -38
  26. arelle/archive/plugin/functionsXmlCreation.py +0 -106
  27. arelle/archive/plugin/hello_i18n.pot +0 -26
  28. arelle/archive/plugin/hello_i18n.py +0 -32
  29. arelle/archive/plugin/importTestChild1.py +0 -21
  30. arelle/archive/plugin/importTestChild2.py +0 -22
  31. arelle/archive/plugin/importTestGrandchild1.py +0 -21
  32. arelle/archive/plugin/importTestGrandchild2.py +0 -21
  33. arelle/archive/plugin/importTestImported1.py +0 -23
  34. arelle/archive/plugin/importTestImported11.py +0 -22
  35. arelle/archive/plugin/importTestParent.py +0 -48
  36. arelle/archive/plugin/instanceInfo.py +0 -306
  37. arelle/archive/plugin/loadFromOIM-2018.py +0 -1282
  38. arelle/archive/plugin/locale/fr/LC_MESSAGES/hello_i18n.po +0 -25
  39. arelle/archive/plugin/objectmaker.py +0 -285
  40. arelle/archive/plugin/packagedImportTest/__init__.py +0 -47
  41. arelle/archive/plugin/packagedImportTest/importTestChild1.py +0 -21
  42. arelle/archive/plugin/packagedImportTest/importTestChild2.py +0 -22
  43. arelle/archive/plugin/packagedImportTest/importTestGrandchild1.py +0 -21
  44. arelle/archive/plugin/packagedImportTest/importTestGrandchild2.py +0 -21
  45. arelle/archive/plugin/packagedImportTest/importTestImported1.py +0 -24
  46. arelle/archive/plugin/packagedImportTest/importTestImported11.py +0 -21
  47. arelle/archive/plugin/packagedImportTest/subdir/importTestImported111.py +0 -21
  48. arelle/archive/plugin/packagedImportTest/subdir/subsubdir/importTestImported1111.py +0 -21
  49. arelle/archive/plugin/sakaCalendar.py +0 -215
  50. arelle/archive/plugin/saveInstanceInfoset.py +0 -121
  51. arelle/archive/plugin/sphinx/FormulaGenerator.py +0 -823
  52. arelle/archive/plugin/sphinx/SphinxContext.py +0 -404
  53. arelle/archive/plugin/sphinx/SphinxEvaluator.py +0 -783
  54. arelle/archive/plugin/sphinx/SphinxMethods.py +0 -1287
  55. arelle/archive/plugin/sphinx/SphinxParser.py +0 -1093
  56. arelle/archive/plugin/sphinx/SphinxValidator.py +0 -163
  57. arelle/archive/plugin/sphinx/US-GAAP Ratios Example.xsr +0 -52
  58. arelle/archive/plugin/sphinx/__init__.py +0 -285
  59. arelle/archive/plugin/streamingExtensions.py +0 -335
  60. arelle/archive/plugin/updateTableLB.py +0 -242
  61. arelle/archive/plugin/validate/SBRnl/CustomLoader.py +0 -19
  62. arelle/archive/plugin/validate/SBRnl/DTS.py +0 -305
  63. arelle/archive/plugin/validate/SBRnl/Dimensions.py +0 -357
  64. arelle/archive/plugin/validate/SBRnl/Document.py +0 -799
  65. arelle/archive/plugin/validate/SBRnl/Filing.py +0 -467
  66. arelle/archive/plugin/validate/SBRnl/__init__.py +0 -75
  67. arelle/archive/plugin/validate/SBRnl/config.xml +0 -26
  68. arelle/archive/plugin/validate/SBRnl/sbr-nl-taxonomies.xml +0 -754
  69. arelle/archive/plugin/validate/USBestPractices.py +0 -570
  70. arelle/archive/plugin/validate/USCorpAction.py +0 -557
  71. arelle/archive/plugin/validate/USSecTagging.py +0 -337
  72. arelle/archive/plugin/validate/XDC/__init__.py +0 -77
  73. arelle/archive/plugin/validate/XDC/config.xml +0 -20
  74. arelle/archive/plugin/validate/XFsyntax/__init__.py +0 -64
  75. arelle/archive/plugin/validate/XFsyntax/xf.py +0 -2227
  76. arelle/archive/plugin/validate/calc2.py +0 -536
  77. arelle/archive/plugin/validateSchemaLxml.py +0 -156
  78. arelle/archive/plugin/validateTableInfoset.py +0 -52
  79. arelle/archive/us-gaap-dei-docType-extraction-frm.xml +0 -90
  80. arelle/archive/us-gaap-dei-ratio-cash-frm.xml +0 -150
  81. arelle/examples/plugin/formulaSuiteConverter.py +0 -212
  82. arelle/examples/plugin/functionsCustom.py +0 -59
  83. arelle/examples/plugin/hello_dolly.py +0 -64
  84. arelle/examples/plugin/multi.py +0 -58
  85. arelle/examples/plugin/rssSaveOim.py +0 -96
  86. arelle/examples/plugin/validate/XYZ/DisclosureSystems.py +0 -2
  87. arelle/examples/plugin/validate/XYZ/PluginValidationDataExtension.py +0 -10
  88. arelle/examples/plugin/validate/XYZ/ValidationPluginExtension.py +0 -50
  89. arelle/examples/plugin/validate/XYZ/__init__.py +0 -75
  90. arelle/examples/plugin/validate/XYZ/resources/config.xml +0 -16
  91. arelle/examples/plugin/validate/XYZ/rules/__init__.py +0 -0
  92. arelle/examples/plugin/validate/XYZ/rules/rules01.py +0 -110
  93. arelle/examples/plugin/validate/XYZ/rules/rules02.py +0 -59
  94. arelle/scripts-macOS/startWebServer.command +0 -3
  95. arelle/scripts-unix/startWebServer.sh +0 -1
  96. arelle/scripts-windows/startWebServer.bat +0 -5
  97. {arelle_release-2.37.47.dist-info → arelle_release-2.37.49.dist-info}/WHEEL +0 -0
  98. {arelle_release-2.37.47.dist-info → arelle_release-2.37.49.dist-info}/entry_points.txt +0 -0
  99. {arelle_release-2.37.47.dist-info → arelle_release-2.37.49.dist-info}/licenses/LICENSE.md +0 -0
  100. {arelle_release-2.37.47.dist-info → arelle_release-2.37.49.dist-info}/top_level.txt +0 -0
@@ -1,43 +0,0 @@
1
- '''
2
- Example extension plugin to provide custom REST api
3
-
4
- See COPYRIGHT.md for copyright information.
5
-
6
- To run test:
7
- arelleCmdLine.exe --webserver localhost:8080 --plugins ../examples/plugin/cmdWebServerExtension.py
8
-
9
- '''
10
-
11
- from arelle.CntlrWebMain import runOptionsAndGetResult
12
- from arelle.RuntimeOptions import RuntimeOptions
13
- from arelle.Version import copyrightLabel
14
-
15
- def my_test():
16
- return _("<html><body><h1>Test</h1><p>It works!</p></body></html>")
17
-
18
- def my_run(file=None):
19
- options = RuntimeOptions() # inspired by CntlrWebMain.validate
20
- options.entrypointFile = file
21
- options.validate = True
22
- return runOptionsAndGetResult(options, "html", None, None)
23
-
24
-
25
- def startWebServer(app, cntlr, host, port, server):
26
- # save
27
- # register /test-response to send a test response string
28
- app.route('/rest/my-test', "GET", my_test)
29
- # register /test/my-run to do a normal "validate" wprkflow cycle but with custom parameters
30
- app.route('/rest/my-run/<file:path>', ("GET", "POST"), my_run)
31
-
32
- return None # return "skip-routes" ## uncomment to block normal api REST "routes"
33
-
34
- __pluginInfo__ = {
35
- 'name': 'REST Extensions',
36
- 'version': '0.9',
37
- 'description': "Sample REST API extensions (or replacements).",
38
- 'license': 'Apache-2',
39
- 'author': 'R\xe9gis D\xce9camps',
40
- 'copyright': copyrightLabel,
41
- # classes of mount points (required)
42
- 'CntlrWebMain.StartWebServer': startWebServer,
43
- }
@@ -1,38 +0,0 @@
1
- '''
2
- Crash test is a plug in to cause an uncaught exception to test its recover
3
-
4
- See COPYRIGHT.md for copyright information.
5
- '''
6
- from arelle.Version import authorLabel, copyrightLabel
7
-
8
- def crashMenuEntender(cntlr, menu):
9
- menu.add_command(label="Crash now!!!", underline=0, command=lambda: crashMenuCommand(cntlr) )
10
-
11
- def crashMenuCommand(cntlr):
12
- foo = 25
13
- foo /= 0
14
-
15
- def crashCommandLineOptionExtender(parser):
16
- parser.add_option("--crash-test",
17
- action="store_true",
18
- dest="crashTest",
19
- help=_('Test what happens with an exception'))
20
-
21
- def crashCommandLineXbrlRun(cntlr, options, modelXbrl, *args, **kwargs):
22
- if getattr(options, "crashTest", False):
23
- foo = 25
24
- foo /= 0
25
-
26
-
27
- __pluginInfo__ = {
28
- 'name': 'Crash Test',
29
- 'version': '0.9',
30
- 'description': "Used to test that uncaught exceptions report their cause to the Arelle user.",
31
- 'license': 'Apache-2',
32
- 'author': authorLabel,
33
- 'copyright': copyrightLabel,
34
- # classes of mount points (required)
35
- 'CntlrWinMain.Menu.Tools': crashMenuEntender,
36
- 'CntlrCmdLine.Options': crashCommandLineOptionExtender,
37
- 'CntlrCmdLine.Xbrl.Run': crashCommandLineXbrlRun,
38
- }
@@ -1,106 +0,0 @@
1
- '''
2
- Sample custom functions plugin for formula XML Element, Attribute creation functions
3
-
4
- >>> note that this function has been renamed xfi:create-element and moved to FunctionXfi.py <<<
5
-
6
- See COPYRIGHT.md for copyright information.
7
- '''
8
- from arelle import XbrlUtil
9
- from arelle.formula import XPathContext
10
- from arelle.ModelValue import qname, QName
11
- from arelle.ModelInstanceObject import ModelDimensionValue, XmlUtil
12
- from arelle.FunctionUtil import qnameArg, nodeArg, atomicArg
13
- from arelle.Version import authorLabel, copyrightLabel
14
- from arelle import XmlValidate
15
- from lxml import etree
16
-
17
- '''
18
- Create an XML element in a "scratchpad" in-memory XML document, to behave like the results
19
- of an fn:doc() that would provide XML elements which can be consumed by formula typed
20
- dimension and OCC constructs.
21
-
22
- The element may be created with attributes and descendant elements, as needed.
23
-
24
- xfxc:element(
25
- qname, // qname of element
26
- (name-value pairs for creating attributes if any),
27
- value, if any, otherwise () or ''
28
- optional nested elements (e.g., xfc:element( ) ... of child nodes)
29
- )
30
-
31
- Attributes may be pairs of string name, value, or pairs of QName, value when attribute
32
- name is qualified.
33
-
34
- A function definition is required in the formula linkbase:
35
- <variable:function name="xfxc:element" output="element()" xlink:type="resource" xlink:label="cust-fn-xfxc-create">
36
- <variable:input type="xs:QName" /> <!-- qname of element to create -->
37
- <variable:input type="xs:anyAtomicType*" /> <!-- sequence of name, value pairs for creating attributes (name can be string or QName) -->
38
- <variable:input type="xs:anyAtomicType" /> <!-- optional value, () or '' if none -->
39
- <variable:input type="element()*" /> <!-- optional sequence of child elements, this parameter can be omitted if no child elements -->
40
- </variable:function>
41
- '''
42
- def xfxc_element(xc, p, contextItem, args):
43
- if not 2 <= len(args) <= 4: raise XPathContext.FunctionNumArgs()
44
- qn = qnameArg(xc, p, args, 0, 'QName', emptyFallback=None)
45
- attrArg = args[1] if isinstance(args[1],(list,tuple)) else (args[1],)
46
- # attributes have to be pairs
47
- if attrArg:
48
- if len(attrArg) & 1 or any(not isinstance(attrArg[i], (QName, str))
49
- for i in range(0, len(attrArg),2)):
50
- raise XPathContext.FunctionArgType(1,"((xs:qname|xs:string),xs:anyAtomicValue)", errCode="xfxce:AttributesNotNameValuePairs")
51
- else:
52
- attrParam = [(attrArg[i],attrArg[i+1]) # need name-value pairs for XmlUtil function
53
- for i in range(0, len(attrArg),2)]
54
- else:
55
- attrParam = None
56
-
57
- value = atomicArg(xc, p, args, 2, "xs:anyAtomicType", emptyFallback='')
58
- if not value: # be sure '' is None so no text node is created
59
- value = None
60
- if len(args) < 4:
61
- childElements = None
62
- else:
63
- childElements = xc.flattenSequence(args[3])
64
-
65
- # scratchpad instance document emulates fn:doc( ) to hold XML nodes
66
- scratchpadXmlDocUrl = "http://www.xbrl.org/2012/function/creation/xml_scratchpad.xml"
67
- if scratchpadXmlDocUrl in xc.modelXbrl.urlDocs:
68
- modelDocument = xc.modelXbrl.urlDocs[scratchpadXmlDocUrl]
69
- else:
70
- # create scratchpad xml document
71
- # this will get the fake instance document in the list of modelXbrl docs so that it is garbage collected
72
- from arelle import ModelDocument
73
- modelDocument = ModelDocument.create(xc.modelXbrl,
74
- ModelDocument.Type.UnknownXML,
75
- scratchpadXmlDocUrl,
76
- initialXml="<xfc:dummy xmlns:xfc='http://www.xbrl.org/2012/function/creation'/>")
77
-
78
- newElement = XmlUtil.addChild(modelDocument.xmlRootElement,
79
- qn,
80
- attributes=attrParam,
81
- text=value)
82
- if childElements:
83
- for element in childElements:
84
- if isinstance(element, etree.ElementBase):
85
- newElement.append(element)
86
-
87
- # node myst be validated for use in instance creation (typed dimension references)
88
- XmlValidate.validate(xc.modelXbrl, newElement)
89
-
90
- return newElement
91
-
92
- def xfxcFunctions():
93
- return {
94
- qname("{http://www.xbrl.org/2012/function/xml-creation}xfxc:element"): xfxc_element,
95
- }
96
-
97
- __pluginInfo__ = {
98
- 'name': 'Formula Xml Creation Functions',
99
- 'version': '1.0',
100
- 'description': "This plug-in adds a custom function to create xml elements, such as for typed dimensions, implemented by a plug-in. ",
101
- 'license': 'Apache-2',
102
- 'author': authorLabel,
103
- 'copyright': copyrightLabel,
104
- # classes of mount points (required)
105
- 'Formula.CustomFunctions': xfxcFunctions,
106
- }
@@ -1,26 +0,0 @@
1
- # Arelle
2
- # Copyright (C) 2011 MarkV System
3
- # This file is distributed under the same license as the Arelle package.
4
- # R�gis D�camps <regis.decamps@acp.banque-france.fr>, 2011.
5
- #
6
- #, fuzzy
7
- msgid ""
8
- msgstr ""
9
- "Project-Id-Version: PACKAGE VERSION\n"
10
- "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2012-01-04 18:08+0100\n"
12
- "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
- "Language-Team: LANGUAGE <LL@li.org>\n"
15
- "MIME-Version: 1.0\n"
16
- "Content-Type: text/plain; charset=CHARSET\n"
17
- "Content-Transfer-Encoding: 8bit\n"
18
-
19
- #: hello_i18n.py:28
20
- msgid "Hello World"
21
- msgstr ""
22
-
23
- #: hello_i18n.py:31
24
- msgid "Prints 'Hello world'"
25
- msgstr ""
26
-
@@ -1,32 +0,0 @@
1
- '''
2
- Hello dolly is a simple "Hello world" to demonstrate how plug-ins
3
- are written for Arelle
4
-
5
- See COPYRIGHT.md for copyright information.
6
- '''
7
- from arelle.Version import copyrightLabel
8
-
9
- def menuEntender(cntlr, menu):
10
- menu.add_command(label="Hello i18n", underline=0, command=lambda: menuCommand(cntlr) )
11
-
12
- def menuCommand(cntlr):
13
- i10L_world = _("Hello World");
14
- cntlr.addToLog(i10L_world)
15
- import tkinter
16
- tkinter.messagebox.showinfo(_("Prints 'Hello World'"), i10L_world, parent=cntlr.parent)
17
-
18
- '''
19
- Do not use _( ) in pluginInfo itself (it is applied later, after loading
20
- '''
21
- __pluginInfo__ = {
22
- 'name': 'Hello i18n',
23
- 'version': '0.9',
24
- 'description': '''Minimal plug-in that demonstrates i18n internationalization by localized gettext.''',
25
- 'localeURL': "locale",
26
- 'localeDomain': 'hello_i18n',
27
- 'license': 'Apache-2',
28
- 'author': 'R\u00e9gis D\u00e9camps',
29
- 'copyright': copyrightLabel,
30
- # classes of mount points (required)
31
- 'CntlrWinMain.Menu.Tools': menuEntender
32
- }
@@ -1,21 +0,0 @@
1
- '''
2
- pluginPackages test case
3
-
4
- See COPYRIGHT.md for copyright information.
5
- '''
6
- from arelle.Version import authorLabel, copyrightLabel
7
-
8
- def foo():
9
- print ("imported unpackaged plug-in child 1")
10
-
11
- __pluginInfo__ = {
12
- 'name': 'Unpackaged Listed Import Child 1',
13
- 'version': '0.9',
14
- 'description': "This is a unpackaged child plugin.",
15
- 'license': 'Apache-2',
16
- 'author': authorLabel,
17
- 'copyright': copyrightLabel,
18
- # classes of mount points (required)
19
- 'Import.Unpackaged.Entry2': foo,
20
- # imported plugins
21
- }
@@ -1,22 +0,0 @@
1
- '''
2
- pluginPackages test case
3
-
4
- See COPYRIGHT.md for copyright information.
5
- '''
6
- from arelle.Version import authorLabel, copyrightLabel
7
-
8
- def foo():
9
- print ("imported unpackaged plug-in child 2")
10
-
11
- __pluginInfo__ = {
12
- 'name': 'Unpackaged Listed Import Child 2',
13
- 'version': '0.9',
14
- 'description': "This is a unpackaged child plugin.",
15
- 'license': 'Apache-2',
16
- 'author': authorLabel,
17
- 'copyright': copyrightLabel,
18
- # classes of mount points (required)
19
- 'Import.Unpackaged.Entry3': foo,
20
- # import plugins
21
- 'import': ('importTestGrandchild1.py', 'importTestGrandchild2.py')
22
- }
@@ -1,21 +0,0 @@
1
- '''
2
- pluginPackages test case
3
-
4
- See COPYRIGHT.md for copyright information.
5
- '''
6
- from arelle.Version import authorLabel, copyrightLabel
7
-
8
- def foo():
9
- print ("imported unpackaged plug-in grandchild 1")
10
-
11
- __pluginInfo__ = {
12
- 'name': 'Unpackaged Listed Import Grandchild 1.1',
13
- 'version': '0.9',
14
- 'description': "This is a packages-containing unpackaged child plugin.",
15
- 'license': 'Apache-2',
16
- 'author': authorLabel,
17
- 'copyright': copyrightLabel,
18
- # classes of mount points (required)
19
- 'Import.Unpackaged.Entry4': foo,
20
- # imported plugins
21
- }
@@ -1,21 +0,0 @@
1
- '''
2
- pluginPackages test case
3
-
4
- See COPYRIGHT.md for copyright information.
5
- '''
6
- from arelle.Version import authorLabel, copyrightLabel
7
-
8
- def foo():
9
- print ("imported unpackaged plug-in grandchild 2")
10
-
11
- __pluginInfo__ = {
12
- 'name': 'Unpackaged Listed Import Grandchild 1.2',
13
- 'version': '0.9',
14
- 'description': "This is a packages-containing child plugin.",
15
- 'license': 'Apache-2',
16
- 'author': authorLabel,
17
- 'copyright': copyrightLabel,
18
- # classes of mount points (required)
19
- 'Import.Unpackaged.Entry5': foo,
20
- # imported plugins
21
- }
@@ -1,23 +0,0 @@
1
- '''
2
- pluginPackages test case
3
-
4
- See COPYRIGHT.md for copyright information.
5
- '''
6
- # this module would raise system error due to PEP 366 after python 3.4.3
7
- from . import importTestImported11
8
- from arelle.Version import authorLabel, copyrightLabel
9
-
10
- def foo():
11
- print ("imported unpackaged plug-in relative imported 1")
12
-
13
- __pluginInfo__ = {
14
- 'name': 'Unpackaged Relative Import 1',
15
- 'version': '0.9',
16
- 'description': "This is a unpackaged relative imported plugin.",
17
- 'license': 'Apache-2',
18
- 'author': authorLabel,
19
- 'copyright': copyrightLabel,
20
- # classes of mount points (required)
21
- 'Import.Unpackaged.Entry6': foo,
22
- # imported plugins
23
- }
@@ -1,22 +0,0 @@
1
- '''
2
- pluginPackages test case
3
-
4
- See COPYRIGHT.md for copyright information.
5
- '''
6
- from arelle.Version import authorLabel, copyrightLabel
7
- # this module would raise system error due to PEP 366 after python 3.4.3
8
-
9
- def foo():
10
- print ("imported unpackaged plug-in imported relative 1.1")
11
-
12
- __pluginInfo__ = {
13
- 'name': 'Unpackaged Relative Import 1.1',
14
- 'version': '0.9',
15
- 'description': "This is a packages-containing unpackaged imported plugin.",
16
- 'license': 'Apache-2',
17
- 'author': authorLabel,
18
- 'copyright': copyrightLabel,
19
- # classes of mount points (required)
20
- 'Import.Unpackaged.Entry7': foo,
21
- # imported plugins
22
- }
@@ -1,48 +0,0 @@
1
- '''
2
- pluginPackages test case
3
-
4
- See COPYRIGHT.md for copyright information.
5
- '''
6
- from arelle.PluginManager import pluginClassMethods
7
- from arelle.Version import authorLabel, copyrightLabel
8
- # . relative import only works inside a package now, see https://www.python.org/dev/peps/pep-0366/
9
- # following two imports raise system error due to PEP 366 after python 3.4.3
10
- # from . import importTestImported1
11
- # from .importTestImported1 import foo
12
-
13
- def parentMenuEntender(cntlr, menu):
14
- menu.add_command(label="Unpackaged Parent exercise descendants", underline=0, command=lambda: parentMenuCommand(cntlr) )
15
-
16
- def parentMenuCommand(cntl):
17
- for i in range(1,100):
18
- for pluginMethod in pluginClassMethods("Import.Unpackaged.Entry{}".format(i)):
19
- pluginMethod()
20
-
21
- def parentCommandLineOptionExtender(parser):
22
- parser.add_option("--unpackageParentImportExample",
23
- action="store_true",
24
- dest="unpackageParentImportExample",
25
- help=_('Test that unpackaged imported plug-ins were actually loaded and activated"'))
26
-
27
- def parentCommandLineUtilityRun(cntlr, options, **kwargs):
28
- if options.unpackageParentImportExample:
29
- parentMenuCommand(cntlr)
30
-
31
- def foo():
32
- print ("parent of imported unpackaged plug-ins")
33
-
34
- __pluginInfo__ = {
35
- 'name': 'Import Test Unpackaged Parent',
36
- 'version': '0.9',
37
- 'description': "This is a imports-containing unpackaged parent plugin.",
38
- 'license': 'Apache-2',
39
- 'author': authorLabel,
40
- 'copyright': copyrightLabel,
41
- # classes of mount points (required)
42
- 'CntlrWinMain.Menu.Tools': parentMenuEntender,
43
- 'CntlrCmdLine.Options': parentCommandLineOptionExtender,
44
- 'CntlrCmdLine.Utility.Run': parentCommandLineUtilityRun,
45
- 'Import.Unpackaged.Entry1': foo,
46
- # imported plugins
47
- 'import': ('importTestChild1.py', 'importTestChild2.py', "module_import_subtree")
48
- }