diff --git a/Core/automation/lib/python/core/__init__.py b/Core/automation/lib/python/core/__init__.py index 52a57a97..534e99d0 100644 --- a/Core/automation/lib/python/core/__init__.py +++ b/Core/automation/lib/python/core/__init__.py @@ -1,9 +1,11 @@ -# This check for the existence of 'scope' and verifying it is not a mock.Mock -# instance are needed for Sphinx autodoc because it tries to search all attrs -import mock -from core import jsr223 +try: + # if this check fails we assume we are in Jython + # if this check passes we assume we are in Python building docs + # this is needed to avoid errors with autodoc iterating over all methods + # and erroring with the attribute-getter below + import mock -if hasattr(jsr223, 'scope') and not isinstance(jsr223.scope, mock.Mock): +except: from core.jsr223.scope import items diff --git a/Docs/Groovy/README.md b/Documentation/Groovy/README.md similarity index 100% rename from Docs/Groovy/README.md rename to Documentation/Groovy/README.md diff --git a/Docs/Javascript/README.md b/Documentation/Javascript/README.md similarity index 100% rename from Docs/Javascript/README.md rename to Documentation/Javascript/README.md diff --git a/Docs/Python/But-How-Do-I.md b/Documentation/Python/But-How-Do-I.md similarity index 100% rename from Docs/Python/But-How-Do-I.md rename to Documentation/Python/But-How-Do-I.md diff --git a/Docs/Python/Community.md b/Documentation/Python/Community.md similarity index 100% rename from Docs/Python/Community.md rename to Documentation/Python/Community.md diff --git a/Docs/Python/Component-Scripts.md b/Documentation/Python/Component-Scripts.md similarity index 100% rename from Docs/Python/Component-Scripts.md rename to Documentation/Python/Component-Scripts.md diff --git a/Docs/Python/Defining-Rules.md b/Documentation/Python/Defining-Rules.md similarity index 100% rename from Docs/Python/Defining-Rules.md rename to Documentation/Python/Defining-Rules.md diff --git a/Docs/Python/Docker.md b/Documentation/Python/Docker.md similarity index 100% rename from Docs/Python/Docker.md rename to Documentation/Python/Docker.md diff --git a/Docs/Python/Event-Object-Attributes.md b/Documentation/Python/Event-Object-Attributes.md similarity index 100% rename from Docs/Python/Event-Object-Attributes.md rename to Documentation/Python/Event-Object-Attributes.md diff --git a/Docs/Python/Example-Scripts.md b/Documentation/Python/Example-Scripts.md similarity index 100% rename from Docs/Python/Example-Scripts.md rename to Documentation/Python/Example-Scripts.md diff --git a/Docs/Python/Getting-Started.md b/Documentation/Python/Getting-Started.md similarity index 100% rename from Docs/Python/Getting-Started.md rename to Documentation/Python/Getting-Started.md diff --git a/Docs/Python/Jython-Modules.md b/Documentation/Python/Jython-Modules.md similarity index 100% rename from Docs/Python/Jython-Modules.md rename to Documentation/Python/Jython-Modules.md diff --git a/Docs/Python/README.md b/Documentation/Python/README.md similarity index 100% rename from Docs/Python/README.md rename to Documentation/Python/README.md