Is there some trick to not having to create little...
# ask-community
t
Is there some trick to not having to create little tasks just to do string formatting like this?
Copy code
@task()
def get_s3_location(workspace_bucket):
    return f's3://{workspace_bucket}/{prefect.context.get("flow_run_name")}/'
Something like the simple addition prefect turns into tasks automatically within the flow?
c
Right now writing a little task is the best way to go but this is definitely something we’d like to simplify if we could pinpoint a clean API for. Note that you can one-liner these things:
Copy code
get_s3_location = task(lambda workspace_bucket: f's3://{workspace_bucket}/{prefect.context.get("flow_run_name")}/', name='get_s3_location')
but I’m not sure that’s any better