Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Commit

Permalink
add github pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-1991 committed Dec 17, 2023
1 parent 628ce20 commit 3abd9e9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sdRDM/markdown/objectutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,12 @@ def process_type_option(

def is_remote_type(dtype: str) -> bool:
"""Checks whether the given type points to a remote model"""
return "@" in dtype and "github" in dtype

if not isinstance(dtype, str):
return False

pattern = r"https:\/\/github\.com\/[A-Za-z0-9-]+\/[A-Za-z0-9-]+\.git\@[A-Za-z0-9-]+"
return bool(re.match(pattern, dtype))


def has_small_type(dtype: str) -> bool:
Expand Down

0 comments on commit 3abd9e9

Please sign in to comment.