-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
46 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
def is_identifiable(o: any) -> bool: | ||
"""Determine if object is identifiable. An object is considered identifiable if | ||
contains a `ga4gh_digest_keys` attribute | ||
:param o: Object | ||
:return: `True` if `o` has `ga4gh_digest_keys` attribute. `False` otherwise. | ||
""" | ||
return hasattr(o, "ga4gh_digest_keys") | ||
|
||
|
||
def is_literal(o: any) -> bool: | ||
return isinstance(o, (str, int, float, complex, bool)) | ||
|
||
|
||
def is_list(o: any) -> bool: | ||
return isinstance(o, list) | ||
|
||
|
||
def is_curie_type(o: any) -> bool: | ||
# return isinstance(o, CURIE) | ||
pass | ||
|
||
def is_pydantic_instance(o: any) -> bool: | ||
# return isinstance(o, BaseModel) | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters