Skip to content

Commit f05bd67

Browse files
committed
Revert "Added de-dupe logic for non types results"
This reverts commit 65159eb.
1 parent 65159eb commit f05bd67

File tree

4 files changed

+6
-123
lines changed

4 files changed

+6
-123
lines changed

socketdev/core/dedupe.py

Lines changed: 0 additions & 114 deletions
This file was deleted.

socketdev/fullscans/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from typing import Any, Dict, List, Optional, Union
55
from dataclasses import dataclass, asdict, field
66
import urllib.parse
7-
from core.dedupe import Dedupe
7+
88
from ..utils import IntegrationType, Utils
99

1010
log = logging.getLogger("socketdev")
@@ -712,7 +712,6 @@ def get(self, org_slug: str, params: dict, use_types: bool = False) -> Union[dic
712712
result = response.json()
713713
if use_types:
714714
return GetFullScanMetadataResponse.from_dict({"success": True, "status": 200, "data": result})
715-
716715
return result
717716

718717
error_message = response.json().get("error", {}).get("message", "Unknown error")
@@ -804,9 +803,9 @@ def stream(self, org_slug: str, full_scan_id: str, use_types: bool = False) -> U
804803
if line != '"' and line != "" and line is not None:
805804
item = json.loads(line)
806805
stream_str.append(item)
807-
stream_deduped = Dedupe.dedupe(stream_str, batched=False)
808-
for batch in stream_deduped:
809-
artifacts[batch["id"]] = batch
806+
for val in stream_str:
807+
artifacts[val["id"]] = val
808+
810809
if use_types:
811810
return FullScanStreamResponse.from_dict({"success": True, "status": 200, "artifacts": artifacts})
812811
return artifacts

socketdev/purl/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import json
22
import urllib.parse
33
from socketdev.log import log
4-
from core.dedupe import Dedupe
54

65

76
class Purl:
@@ -33,8 +32,7 @@ def post(self, license: str = "false", components: list = None, **kwargs) -> lis
3332
purl.append(item)
3433
except json.JSONDecodeError:
3534
continue
36-
purl_deduped = Dedupe.dedupe(purl)
37-
return purl_deduped
35+
return purl
3836

3937
log.error(f"Error posting {components} to the Purl API: {response.status_code}")
4038
print(response.text)

socketdev/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.0.17"
1+
__version__ = "2.0.16"

0 commit comments

Comments
 (0)