Skip to content

Commit

Permalink
Check for class instances of AbstractPath in extract_paths
Browse files Browse the repository at this point in the history
  • Loading branch information
curufinwe authored Aug 9, 2023
1 parent 454943a commit 3439760
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sisyphus/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import sisyphus.global_settings as gs
from sisyphus.block import Block
from sisyphus.job_path import AbstractPath


def get_system_informations(file=sys.stdout):
Expand Down Expand Up @@ -86,7 +87,7 @@ def extract_paths(args: Any) -> Set:
visited_obj_ids[id(obj)] = obj
if isinstance(obj, Block) or isinstance(obj, enum.Enum):
continue
if hasattr(obj, '_sis_path') and obj._sis_path is True:
if hasattr(obj, '_sis_path') and obj._sis_path is True and not (type(obj) is type and issubclass(obj, AbstractPath)):
out.add(obj)
elif isinstance(obj, (list, tuple, set)):
queue.extend(obj)
Expand Down

0 comments on commit 3439760

Please sign in to comment.