-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement and document properties function (#66)
- Loading branch information
Showing
6 changed files
with
25 additions
and
2 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from .UserObject import UserObject, UserProperties | ||
from .UserProperty import UserProperty | ||
from .functions import properties |
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,15 @@ | ||
from typing import Dict | ||
|
||
from ..base_schema import Schema | ||
from .UserObject import UserObject | ||
|
||
|
||
def properties(user_object: UserObject) -> Dict[str, Schema]: | ||
""" | ||
Retrieve the property names and their associated :class:`~wysdom.base_schema.Schema` | ||
objects for a particular `:class:`~wysdom.user_objects.UserObject. | ||
:param user_object: A `:class:`~wysdom.user_objects.UserObject | ||
:return: A dictionary mapping property names to their :class:`~wysdom.base_schema.Schema` | ||
""" | ||
return user_object.__json_schema_properties__.properties |