Skip to content

Commit

Permalink
Merge pull request #86 from singnet/bugfix/change-type-hint
Browse files Browse the repository at this point in the history
[das-query-engine#173] Change the type hint in query()
  • Loading branch information
marcocapozzoli authored Mar 6, 2024
2 parents 60b0842 + 485f755 commit 8b0c2e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion das-query-engine/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def get_incoming_links(
@remove_none_args
def query(
self,
query: Dict[str, Any],
query: List[Dict[str, Any]] | Dict[str, Any],
parameters: Dict[str, Any] = {"no_iterator": True},
) -> List[Dict[str, Any]]:
return self.distributed_atom_space.query(query, parameters)
Expand Down
2 changes: 1 addition & 1 deletion das-query-engine/validators/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class QueryValidator(PayloadValidator):
strict = True

query = datatypes.Function(
lambda value, *args, **kwargs: isinstance(value, dict),
lambda value, *args, **kwargs: isinstance(value, dict) or all(isinstance(item, dict) for item in value),
required=True,
)

Expand Down

0 comments on commit 8b0c2e8

Please sign in to comment.