From e588e12d43676bc53d7066e4bbe7d227427c9ca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20L=2E=20Redrejo=20Rodr=C3=ADguez?= Date: Thu, 17 Oct 2019 19:18:51 +0200 Subject: [PATCH] Append current directory to the Python sys.path --- transformer/plugins/resolve.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/transformer/plugins/resolve.py b/transformer/plugins/resolve.py index e771a75..6720253 100644 --- a/transformer/plugins/resolve.py +++ b/transformer/plugins/resolve.py @@ -1,6 +1,8 @@ import importlib import inspect import logging +import sys +from os import getcwd from types import ModuleType from typing import Iterator @@ -27,6 +29,7 @@ def resolve(name: str) -> Iterator[Plugin]: :raise InvalidContractError: from load_load_plugins_from_module. :raise NoPluginError: from load_load_plugins_from_module. """ + sys.path.append(getcwd()) module = importlib.import_module(name) yield from load_plugins_from_module(module)