Skip to content

Commit

Permalink
RF: condense the code and thus make (internal var) location to be a n…
Browse files Browse the repository at this point in the history
…on-Optional str
  • Loading branch information
yarikoptic committed Oct 20, 2023
1 parent 00f41ba commit 24901a9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dandi/dandiarchive.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,16 +754,14 @@ def parse(
# asset_type = groups.get("asset_type")
dandiset_id = groups.get("dandiset_id")
version_id = groups.get("version")
location: Optional[str]
location: str
if groups.get("location_folder") is not None:
assert "location" not in groups
location = urlunquote(groups["location_folder"])
if not location.endswith("/") and not glob:
location += "/"
else:
location = groups.get("location")
if location:
location = urlunquote(location)
location = urlunquote(groups.get("location") or "")
asset_id = groups.get("asset_id")
path = groups.get("path")
glob_param = groups.get("glob")
Expand Down

0 comments on commit 24901a9

Please sign in to comment.