Skip to content

Commit

Permalink
fix: adjust error models + fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
0xMochan committed Apr 6, 2023
1 parent 05ea069 commit fa853d7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 0 additions & 4 deletions subgrounds/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ class SchemaError(SubgroundsError):
"""Errors related to schema"""


class QueryError(SubgroundsError):
"""Errors related to queries"""


class TransformError(SubgroundsError):
"""Errors related to transforms"""

Expand Down
6 changes: 3 additions & 3 deletions subgrounds/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

from pipe import map, take, traverse, where

from .errors import QueryError
from .errors import SubgroundsError
from .schema import SchemaMeta, TypeMeta, TypeRef
from .utils import (
extract_data,
Expand Down Expand Up @@ -550,7 +550,7 @@ def map(
return map_f(new_selection)

case _:
raise QueryError(f"map: invalid priority {priority}")
raise SubgroundsError(f"map: invalid priority {priority}")

def map_args(
self,
Expand Down Expand Up @@ -871,7 +871,7 @@ def vardef_of_arg(arg):

def combine(self: Selection, other: Selection) -> Selection:
if self.key != other.key:
raise QueryError(f"Selection.combine: {self.key} != {other.key}")
raise SubgroundsError(f"Selection.combine: {self.key} != {other.key}")

return Selection(
fmeta=self.fmeta,
Expand Down
1 change: 0 additions & 1 deletion subgrounds/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,4 +410,3 @@ def type_of(
"""Returns the argument or field definition's underlying type"""

return self.type_of_typeref(tmeta.type_)
return self.type_of_typeref(tmeta.type_)

0 comments on commit fa853d7

Please sign in to comment.