diff --git a/mythril/plugin/__init__.py b/mythril/plugin/__init__.py index 81854dee..28aa0f97 100644 --- a/mythril/plugin/__init__.py +++ b/mythril/plugin/__init__.py @@ -1,3 +1,2 @@ from mythril.plugin.interface import MythrilPlugin, MythrilCLIPlugin from mythril.plugin.loader import MythrilPluginLoader - diff --git a/mythril/plugin/discovery.py b/mythril/plugin/discovery.py index 528c768f..9139fce2 100644 --- a/mythril/plugin/discovery.py +++ b/mythril/plugin/discovery.py @@ -12,8 +12,7 @@ class PluginDiscovery(object, metaclass=Singleton): # Installed plugins structure. Retreives all modules that have an entry point for mythril.plugins _installed_plugins = { entry_point.name: entry_point.load() - for entry_point - in pkg_resources.iter_entry_points('mythril.plugins') + for entry_point in pkg_resources.iter_entry_points("mythril.plugins") } def is_installed(self, plugin_name: str) -> bool: diff --git a/mythril/plugin/interface.py b/mythril/plugin/interface.py index 0e16cc97..890108dc 100644 --- a/mythril/plugin/interface.py +++ b/mythril/plugin/interface.py @@ -10,12 +10,12 @@ class MythrilPlugin: 3. Add an analysis module, in this case the AnalysisModule interface needs to be implemented 4. Add new commands to the Mythril cli, using the MythrilCLIPlugin Interface """ + author = "Default Author" plugin_license = "All rights reserved." plugin_type = "Mythril Plugin" plugin_version = "0.0.1 " - plugin_description = \ - "This is an example plugin description" + plugin_description = "This is an example plugin description" def __init__(self): pass @@ -29,4 +29,5 @@ class MythrilCLIPlugin(MythrilPlugin): This interface should be implemented by mythril plugins that aim to add commands to the mythril cli """ + pass diff --git a/mythril/plugin/loader.py b/mythril/plugin/loader.py index 807fa553..558263ff 100644 --- a/mythril/plugin/loader.py +++ b/mythril/plugin/loader.py @@ -4,6 +4,7 @@ from mythril.plugin.interface import MythrilCLIPlugin, MythrilPlugin from mythril.support.support_utils import Singleton import logging + log = logging.getLogger(__name__) diff --git a/tests/plugin/interface_test.py b/tests/plugin/interface_test.py index d7a0b3c5..103037cc 100644 --- a/tests/plugin/interface_test.py +++ b/tests/plugin/interface_test.py @@ -7,4 +7,3 @@ def test_construct_cli_plugin(): def test_construct_mythril_plugin(): _ = MythrilPlugin -