From c64c4483c6d9c1d287eb53c1078ba0dc52cd7922 Mon Sep 17 00:00:00 2001 From: Harshad Date: Thu, 21 Mar 2024 17:45:35 -0500 Subject: [PATCH] Refactor code to avoid unnecessary delay in code (#67) --- src/kgcl_schema/grammar/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kgcl_schema/grammar/parser.py b/src/kgcl_schema/grammar/parser.py index 2782fd4..456ff51 100644 --- a/src/kgcl_schema/grammar/parser.py +++ b/src/kgcl_schema/grammar/parser.py @@ -643,8 +643,8 @@ def get_entity_representation(entity): def contract_uri(uri_or_curie: str): - converter = get_curie_converter() if uri_or_curie.startswith("http://") or uri_or_curie.startswith("https://"): + converter = get_curie_converter() return converter.compress(uri_or_curie) else: return uri_or_curie