From 94ac5b6fb0dc8896d3a65626d807efc698527a61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boris=20Cl=C3=A9net?= Date: Wed, 12 Jun 2024 14:40:11 +0200 Subject: [PATCH] Bug corrections (codespell & typo) --- bids_prov/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bids_prov/utils.py b/bids_prov/utils.py index d5472c26..3e57116a 100644 --- a/bids_prov/utils.py +++ b/bids_prov/utils.py @@ -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 @@ -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