Skip to content

Commit 130f2c4

Browse files
negasoraplafosse
authored andcommitted
Fix python project PluginCommand
1 parent 9856295 commit 130f2c4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

python/plugin.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from . import highlevelil
3434
from . import lowlevelil
3535
from . import mediumlevelil
36-
from . import project
36+
from .project import Project
3737
from .enums import PluginCommandType
3838
from .log import log_error
3939

@@ -250,7 +250,7 @@ def _high_level_il_instruction_action(view, func, instr, action):
250250
@staticmethod
251251
def _project_action(project, action):
252252
try:
253-
project_obj = project.Project(handle=core.BNNewProjectReference(project))
253+
project_obj = Project(handle=core.BNNewProjectReference(project))
254254
action(project_obj)
255255
except:
256256
log_error(traceback.format_exc())
@@ -403,7 +403,7 @@ def _project_is_valid(project, is_valid):
403403
try:
404404
if is_valid is None:
405405
return True
406-
project_obj = project.Project(handle=core.BNNewProjectReference(project))
406+
project_obj = Project(handle=core.BNNewProjectReference(project))
407407
return is_valid(project_obj)
408408
except:
409409
log_error(traceback.format_exc())
@@ -786,16 +786,16 @@ def register_for_high_level_il_instruction(
786786

787787
@classmethod
788788
def register_for_project(
789-
cls, name: str, description: str, action: Callable[['project.Project'], None],
790-
is_valid: Optional[Callable[['project.Project'], bool]] = None
789+
cls, name: str, description: str, action: Callable[['Project'], None],
790+
is_valid: Optional[Callable[['Project'], bool]] = None
791791
):
792792
r"""
793793
``register_for_project`` Register a plugin to be called with a project argument
794794
795795
:param str name: name of the plugin (use 'Folder\\Name' to have the menu item nested in a folder)
796796
:param str description: description of the plugin
797-
:param callback action: function to call with the :class:`~project.Project` as an argument
798-
: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
797+
:param callback action: function to call with the :class:`~Project` as an argument
798+
:param callback is_valid: optional argument of a function passed a :class:`~Project` to determine whether the plugin should be enabled for that project
799799
:rtype: None
800800
:Example:
801801

0 commit comments

Comments
 (0)