Skip to content

Commit

Permalink
adding link back to constructing class
Browse files Browse the repository at this point in the history
  • Loading branch information
bknueven committed May 21, 2024
1 parent 3cf3a84 commit e552d42
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions idaes/core/base/process_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ def __init__(self, *args, **kwargs):
dct["__process_block__"] = "indexed"
# provide function ``base_class_module()`` to get unit module, for visualizer
dct["base_class_module"] = lambda mcs: bases[0].__module__
# provide function ``process_block_class()`` to get the constructing class
dct["process_block_class"] = lambda mcs: bases[0]
return type.__new__(mcs, name, bases, dct)


Expand All @@ -130,6 +132,8 @@ def __init__(self, *args, **kwargs):
dct["__process_block__"] = "scalar"
# provide function ``base_class_module()`` to get unit module, for visualizer
dct["base_class_module"] = lambda mcs: bases[0].__module__
# provide function ``process_block_class()`` to get the constructing class
dct["process_block_class"] = lambda mcs: bases[1]
return type.__new__(mcs, name, bases, dct)


Expand Down

0 comments on commit e552d42

Please sign in to comment.