Alireza Taghizadeh
09/02/2021, 6:29 AMZach Angell
staticmethods
, it may work in some cases.
The simplest workaround (assuming your class is not keeping meaningful state) would be to have a simple functional task that instantiates your class and calls the relevant method
class MyClass:
...
def my_method(self, x):
print(x)
@task
def call_my_class_my_method(x):
return MyClass().my_method(x)
Alireza Taghizadeh
09/02/2021, 1:51 PM