Skip to content

feature suggestion: accept MethodType and LambdaType #46

@Andrew-Wichmann

Description

@Andrew-Wichmann

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.
        )
    ],
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions