From 3742694fd4f6cfa915ae44a4467a9f590cf39a01 Mon Sep 17 00:00:00 2001 From: RA80533 <32469082+RA80533@users.noreply.github.com> Date: Mon, 5 Jun 2023 19:56:30 -0400 Subject: [PATCH] Return a `list` in `scanElementSourcesAll()` --- spiderfoot/db.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spiderfoot/db.py b/spiderfoot/db.py index a355dcf3939..8a35780dd10 100644 --- a/spiderfoot/db.py +++ b/spiderfoot/db.py @@ -1600,7 +1600,7 @@ def scanElementChildrenDirect(self, instanceId: str, elementIdList: typing.List[ except sqlite3.Error as e: raise IOError("SQL error encountered when getting child element IDs") from e - def scanElementSourcesAll(self, instanceId: str, childData: typing.List[typing.Tuple[int, typing.Optional[str], typing.Optional[str], str, str, int, int, int, str, str, str, str, str, int, int]]) -> typing.Tuple[typing.Dict[str, typing.Union[typing.Tuple[int, typing.Optional[str], typing.Optional[str], str, str, int, int, int, str, str, str, str, str, int, int], typing.Tuple[int, typing.Optional[str], typing.Optional[str], str, str, int, int, int, str, str, str, str, str, int, int, str, str, str]]], typing.Dict[str, typing.List[str]]]: + def scanElementSourcesAll(self, instanceId: str, childData: typing.List[typing.Tuple[int, typing.Optional[str], typing.Optional[str], str, str, int, int, int, str, str, str, str, str, int, int]]) -> typing.List[typing.Union[typing.Dict[str, typing.Union[typing.Tuple[int, typing.Optional[str], typing.Optional[str], str, str, int, int, int, str, str, str, str, str, int, int], typing.Tuple[int, typing.Optional[str], typing.Optional[str], str, str, int, int, int, str, str, str, str, str, int, int, str, str, str]]], typing.Dict[str, typing.List[str]]]]: """Get the full set of upstream IDs which are parents to the supplied set of IDs. Args: @@ -1672,7 +1672,7 @@ def scanElementSourcesAll(self, instanceId: str, childData: typing.List[typing.T assert row datamap[parentId] = row - return (datamap, pc) + return [datamap, pc] def scanElementChildrenAll(self, instanceId: str, parentIds: typing.List[str]) -> typing.List[str]: """Get the full set of downstream IDs which are children of the supplied set of IDs.