aboutsummaryrefslogtreecommitdiffstats
path: root/bsfs/query/validator.py
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2023-03-02 16:46:11 +0100
committerMatthias Baumgartner <dev@igsor.net>2023-03-02 16:46:11 +0100
commit2c6c23f85e7f2123c508f9ff8a4aa776948bb589 (patch)
treec343b8aa7ae1d148ae317c406df6fe85747bd99a /bsfs/query/validator.py
parent6b9379d75198082054c35e44bc2cd880353a7485 (diff)
downloadbsfs-2c6c23f85e7f2123c508f9ff8a4aa776948bb589.tar.gz
bsfs-2c6c23f85e7f2123c508f9ff8a4aa776948bb589.tar.bz2
bsfs-2c6c23f85e7f2123c508f9ff8a4aa776948bb589.zip
minor style fixes
Diffstat (limited to 'bsfs/query/validator.py')
-rw-r--r--bsfs/query/validator.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bsfs/query/validator.py b/bsfs/query/validator.py
index b259ea0..1ce44e9 100644
--- a/bsfs/query/validator.py
+++ b/bsfs/query/validator.py
@@ -36,11 +36,11 @@ class Filter():
def __init__(self, schema: bsc.Schema):
self.schema = schema
- def __call__(self, root_type: bsc.Node, query: ast.filter.FilterExpression):
+ def __call__(self, root_type: bsc.Node, query: ast.filter.FilterExpression) -> bool:
"""Alias for `Filter.validate`."""
return self.validate(root_type, query)
- def validate(self, root_type: bsc.Node, query: ast.filter.FilterExpression):
+ def validate(self, root_type: bsc.Node, query: ast.filter.FilterExpression) -> bool:
"""Validate a filter *query*, assuming the subject having *root_type*.
Raises a `bsfs.utils.errors.ConsistencyError` if the query violates the schema.
@@ -241,11 +241,11 @@ class Fetch():
def __init__(self, schema: bsc.Schema):
self.schema = schema
- def __call__(self, root_type: bsc.Node, query: ast.filter.FilterExpression):
+ def __call__(self, root_type: bsc.Node, query: ast.fetch.FetchExpression) -> bool:
"""Alias for `Fetch.validate`."""
return self.validate(root_type, query)
- def validate(self, root_type: bsc.Node, query: ast.fetch.FetchExpression):
+ def validate(self, root_type: bsc.Node, query: ast.fetch.FetchExpression) -> bool:
"""Validate a fetch *query*, assuming the subject having *root_type*.
Raises a `bsfs.utils.errors.ConsistencyError` if the query violates the schema.