Skip to content

Commit

Permalink
Update util.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Nov 6, 2023
1 parent b991ad8 commit d11573d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/sssom/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1103,11 +1103,6 @@ def is_curie(string: str) -> bool:

def is_iri(string: str) -> bool:
"""Check if the string is an IRI."""
warnings.warn(
"Use :meth:`curies.Converter.is_uri` via a well-defined Converter instance",
DeprecationWarning,
stacklevel=2,
)
return validators.url(string)


Expand All @@ -1128,7 +1123,12 @@ def get_prefixes_used_in_table(df: pd.DataFrame, converter: Converter) -> Set[st
if col not in df.columns:
continue
prefixes.update(
converter.parse_curie(row).prefix for row in df[col] if converter.is_curie(row)
converter.parse_curie(row).prefix
for row in df[col]
# we don't use the converter here since get_prefixes_used_in_table
# is often used to identify prefixes that are not properly registered
# in the converter
if not is_iri(row) and is_curie(row)
)
return set(prefixes)

Expand Down

0 comments on commit d11573d

Please sign in to comment.