aboutsummaryrefslogtreecommitdiffstats
path: root/bsfs/schema/__init__.py
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2023-01-11 21:20:47 +0100
committerMatthias Baumgartner <dev@igsor.net>2023-01-11 21:20:47 +0100
commitc664d19e7d4a0aa0762c30a72ae238cf818891ab (patch)
tree93349de711a18cff8329745af22710738b933cdc /bsfs/schema/__init__.py
parent7f5a2920ef311b2077300714d7700313077a0bf6 (diff)
downloadbsfs-c664d19e7d4a0aa0762c30a72ae238cf818891ab.tar.gz
bsfs-c664d19e7d4a0aa0762c30a72ae238cf818891ab.tar.bz2
bsfs-c664d19e7d4a0aa0762c30a72ae238cf818891ab.zip
Feature support in the schema
* Type annotations * Feature type * Moved from_string from Schema to its own file/function * Root predicate has a valid (not-None) range * ROOT_... export in schema.types * Empty as the default Schema constructor * Schema loads some additional default symbols * _Type instances compare along class hierarchy
Diffstat (limited to 'bsfs/schema/__init__.py')
-rw-r--r--bsfs/schema/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bsfs/schema/__init__.py b/bsfs/schema/__init__.py
index ad4d456..dc24313 100644
--- a/bsfs/schema/__init__.py
+++ b/bsfs/schema/__init__.py
@@ -9,7 +9,8 @@ import typing
# inner-module imports
from .schema import Schema
-from .types import Literal, Node, Predicate
+from .serialize import from_string, to_string
+from .types import Literal, Node, Predicate, _Vertex # FIXME: _Vertex
# exports
__all__: typing.Sequence[str] = (
@@ -17,6 +18,8 @@ __all__: typing.Sequence[str] = (
'Node',
'Predicate',
'Schema',
+ 'from_string',
+ 'to_string',
)
## EOF ##