Skip to content

Commit

Permalink
removeprefix
Browse files Browse the repository at this point in the history
  • Loading branch information
chamini2 committed Oct 30, 2024
1 parent 7841bac commit ddb1966
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion projects/fal/src/fal/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions projects/fal/src/fal/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit ddb1966

Please sign in to comment.