Skip to content

Commit 2dab105

Browse files
authored
fix: use the pre-compiled version regex (#1241)
1 parent aeafd98 commit 2dab105

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pystac/extensions/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def remove_from(cls, obj: S) -> None:
148148
def has_extension(cls, obj: S) -> bool:
149149
"""Check if the given object implements this extension by checking
150150
:attr:`pystac.STACObject.stac_extensions` for this extension's schema URI."""
151-
schema_startswith = re.split(VERSION_REGEX, cls.get_schema_uri())[0] + "/"
151+
schema_startswith = VERSION_REGEX.split(cls.get_schema_uri())[0] + "/"
152152

153153
return obj.stac_extensions is not None and any(
154154
uri.startswith(schema_startswith) for uri in obj.stac_extensions

0 commit comments

Comments
 (0)