From ddb1966b6e1d64d4587dfa23185834ce58ad2c63 Mon Sep 17 00:00:00 2001 From: Matteo Ferrando Date: Wed, 30 Oct 2024 12:30:57 -0400 Subject: [PATCH] removeprefix --- projects/fal/src/fal/apps.py | 3 ++- projects/fal/src/fal/workflows.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/projects/fal/src/fal/apps.py b/projects/fal/src/fal/apps.py index d33cb3c9..f2c84b3d 100644 --- a/projects/fal/src/fal/apps.py +++ b/projects/fal/src/fal/apps.py @@ -173,7 +173,8 @@ def submit(app_id: str, arguments: dict[str, Any], *, path: str = "") -> Request app_id = _backwards_compatible_app_id(app_id) url = _QUEUE_URL_FORMAT.format(app_id=app_id) if path: - url += path if path.startswith("/") else "/" + path + _path = path[len("/") :] if path.startswith("/") else path + url += "/" + _path creds = get_default_credentials() diff --git a/projects/fal/src/fal/workflows.py b/projects/fal/src/fal/workflows.py index ba338ec8..62c50ebf 100644 --- a/projects/fal/src/fal/workflows.py +++ b/projects/fal/src/fal/workflows.py @@ -51,12 +51,12 @@ def parse_leaf(raw_leaf: str) -> Leaf: ) # remove the $ prefix - reference = ( + _reference = ( reference[len(VARIABLE_PREFIX) :] if reference.startswith(VARIABLE_PREFIX) else reference ) - leaf: Leaf = ReferenceLeaf(reference) + leaf: Leaf = ReferenceLeaf(_reference) for raw_part in raw_parts: if raw_part.isdigit(): leaf = IndexLeaf(leaf, int(raw_part))