Skip to content

Commit

Permalink
Bug corrections (codespell & typo)
Browse files Browse the repository at this point in the history
  • Loading branch information
bclenet committed Jun 12, 2024
1 parent c37f565 commit 94ac5b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bids_prov/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ def simplify_urns(graph: str) -> str:
The input string with simplified urns.
"""

# Get all occurences of ("urn:" + 36 following chars)
urn_occurences = [i for i in re.finditer(r'urn:[a-zA-Z0-9\-]{36}', content)]
# Get all occurrences of ("urn:" + 36 following chars)
urn_occurrences = [i for i in re.finditer(r'urn:[a-zA-Z0-9\-]{36}', graph)]

# Prepare a dict in which :
# - key is an urn as present in the original graph
Expand All @@ -146,7 +146,7 @@ def simplify_urns(graph: str) -> str:
counter = 0

# Assign one simpler id to each urn
for urn in urn_occurences:
for urn in urn_occurrences:
if urn.group() not in known_urns:
known_urns[urn.group()] = f"urn:{str(counter).zfill(36)}"
counter += 1
Expand Down

0 comments on commit 94ac5b6

Please sign in to comment.