https://prefect.io logo
Title
j

Jens

01/26/2023, 2:15 PM
Hey all, I have the following question I have a class with
class TestClass:
    def __init__(self, atr_a, atr_b):
        self.atr_a=atr_a
        self.atr_b=atr_b

@task()
def test_method(self, text):
    texts = self.atr_a(text)
    ...
    ...
Than i have a other script whicht defines my flow
@flow()
def my_test_flow():
    test_class = TestClass(atr_a=..., atr_b=...)
    test.class.test_method(text=text)
If I run this example I get the error: Function 'test_method' has signature 'self, text' but received args: (....... ) Is there a way, I can call a Task inside a class?