mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-05 03:07:42 +00:00
fix: ignore class types when filtering workflow steps (#1085)
* fix: ignore class types when filtering workflow steps * chore: add TODO for record method in RDLoop * lint
This commit is contained in:
@@ -60,7 +60,8 @@ class LoopMeta(type):
|
||||
"""
|
||||
steps = LoopMeta._get_steps(bases) # all the base classes of parents
|
||||
for name, attr in attrs.items():
|
||||
if not name.startswith("_") and callable(attr):
|
||||
if not name.startswith("_") and callable(attr) and not isinstance(attr, type):
|
||||
# NOTE: `not isinstance(attr, type)` is trying to exclude class type attribute
|
||||
if name not in steps and name not in ["load", "dump"]: # incase user override the load/dump method
|
||||
# NOTE: if we override the step in the subclass
|
||||
# Then it is not the new step. So we skip it.
|
||||
|
||||
Reference in New Issue
Block a user