whoop whoop black

pull/1331/head
Joran Honig 5 years ago
parent 9f887bfdf1
commit 4413a033ff
  1. 1
      mythril/plugin/__init__.py
  2. 3
      mythril/plugin/discovery.py
  3. 5
      mythril/plugin/interface.py
  4. 1
      mythril/plugin/loader.py
  5. 1
      tests/plugin/interface_test.py

@ -1,3 +1,2 @@
from mythril.plugin.interface import MythrilPlugin, MythrilCLIPlugin
from mythril.plugin.loader import MythrilPluginLoader

@ -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:

@ -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

@ -4,6 +4,7 @@ from mythril.plugin.interface import MythrilCLIPlugin, MythrilPlugin
from mythril.support.support_utils import Singleton
import logging
log = logging.getLogger(__name__)

@ -7,4 +7,3 @@ def test_construct_cli_plugin():
def test_construct_mythril_plugin():
_ = MythrilPlugin

Loading…
Cancel
Save