There is an assertion that all functions of an action must be FunctionType. If a class method is provided, the error "'records' is not a list AssertionError " is thrown which is not the actual issue.
It would be nice if class methods were allowed to be part of an Action's "things to be called".
to replicate:
class MyClass():
@classmethod
def func(cls, arg1):
pass
PATHS = {
"PATH1": [
Action(
functions=[MyClass.func],
)
],
}
suggestion
class MyClass():
@classmethod
def func(cls, arg1):
pass
PATHS = {
"PATH1": [
Action(
callables=[MyClass.func], // "callables" isn't a great name. Naming things is hard.
)
],
}
There is an assertion that all
functionsof an action must be FunctionType. If a class method is provided, the error"'records' is not a list AssertionError "is thrown which is not the actual issue.It would be nice if class methods were allowed to be part of an Action's "things to be called".
to replicate:
suggestion