diff --git a/socketdev/fullscans/__init__.py b/socketdev/fullscans/__init__.py index 1f00f64..fbedbb9 100644 --- a/socketdev/fullscans/__init__.py +++ b/socketdev/fullscans/__init__.py @@ -343,11 +343,9 @@ def from_dict(cls, data: dict) -> "LicenseMatch": @dataclass class LicenseDetail: authors: List[str] - charEnd: int - charStart: int + errorData: str filepath: str match_strength: int - filehash: str provenance: str spdxDisj: List[List[LicenseMatch]] @@ -360,14 +358,13 @@ def to_dict(self): @classmethod def from_dict(cls, data: dict) -> "LicenseDetail": return cls( + spdxDisj=data["spdxDisj"], authors=data["authors"], - charEnd=data["charEnd"], - charStart=data["charStart"], + errorData=data["errorData"], + provenance=data["provenance"], filepath=data["filepath"], match_strength=data["match_strength"], - filehash=data["filehash"], - provenance=data["provenance"], - spdxDisj=[[LicenseMatch.from_dict(match) for match in group] for group in data["spdxDisj"]], + ) @@ -766,10 +763,10 @@ def stream_diff( before: str, after: str, use_types: bool = True, - include_license_details: bool = False, + include_license_details: str = "true", **kwargs, ) -> Union[dict, StreamDiffResponse]: - path = f"orgs/{org_slug}/full-scans/diff?before={before}&after={after}&{include_license_details}" + path = f"orgs/{org_slug}/full-scans/diff?before={before}&after={after}&include_license_details={include_license_details}" if kwargs: for key, value in kwargs.items(): path += f"&{key}={value}" diff --git a/socketdev/version.py b/socketdev/version.py index 0b167e6..b6d2a0c 100644 --- a/socketdev/version.py +++ b/socketdev/version.py @@ -1 +1 @@ -__version__ = "2.1.5" +__version__ = "2.1.7"