summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJosh Ferrell <josh@vector35.com>2025-07-23 11:08:26 -0400
committerPeter LaFosse <peter@vector35.com>2025-07-23 12:53:09 -0400
commit130f2c4d8bd16f6e218c1127e10c4d2c57bb2071 (patch)
treeadd3a81bba213d2d2aa3d35e0ceacf7234ee6826 /python
parent98562957a866b975e2c7efcffc32f875910f468c (diff)
Fix python project PluginCommand
Diffstat (limited to 'python')
-rw-r--r--python/plugin.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/python/plugin.py b/python/plugin.py
index 13a41c48..761591e5 100644
--- a/python/plugin.py
+++ b/python/plugin.py
@@ -33,7 +33,7 @@ from . import function
from . import highlevelil
from . import lowlevelil
from . import mediumlevelil
-from . import project
+from .project import Project
from .enums import PluginCommandType
from .log import log_error
@@ -250,7 +250,7 @@ class PluginCommand(metaclass=_PluginCommandMetaClass):
@staticmethod
def _project_action(project, action):
try:
- project_obj = project.Project(handle=core.BNNewProjectReference(project))
+ project_obj = Project(handle=core.BNNewProjectReference(project))
action(project_obj)
except:
log_error(traceback.format_exc())
@@ -403,7 +403,7 @@ class PluginCommand(metaclass=_PluginCommandMetaClass):
try:
if is_valid is None:
return True
- project_obj = project.Project(handle=core.BNNewProjectReference(project))
+ project_obj = Project(handle=core.BNNewProjectReference(project))
return is_valid(project_obj)
except:
log_error(traceback.format_exc())
@@ -786,16 +786,16 @@ class PluginCommand(metaclass=_PluginCommandMetaClass):
@classmethod
def register_for_project(
- cls, name: str, description: str, action: Callable[['project.Project'], None],
- is_valid: Optional[Callable[['project.Project'], bool]] = None
+ cls, name: str, description: str, action: Callable[['Project'], None],
+ is_valid: Optional[Callable[['Project'], bool]] = None
):
r"""
``register_for_project`` Register a plugin to be called with a project argument
:param str name: name of the plugin (use 'Folder\\Name' to have the menu item nested in a folder)
:param str description: description of the plugin
- :param callback action: function to call with the :class:`~project.Project` as an argument
- :param callback is_valid: optional argument of a function passed a :class:`~project.Project` to determine whether the plugin should be enabled for that project
+ :param callback action: function to call with the :class:`~Project` as an argument
+ :param callback is_valid: optional argument of a function passed a :class:`~Project` to determine whether the plugin should be enabled for that project
:rtype: None
:Example: