Skip to content

Commit e286a18

Browse files
Don't remove license references in package license detection
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
1 parent 4cf84c7 commit e286a18

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

src/packagedcode/licensing.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
from licensedcode.detection import find_referenced_resource
2525
from licensedcode.detection import detect_licenses
2626
from licensedcode.detection import LicenseDetectionFromResult
27-
from licensedcode.licenses_reference import extract_license_rules_reference_data
2827
from licensedcode.spans import Span
2928
from licensedcode import query
3029

@@ -110,9 +109,6 @@ def add_referenced_license_matches_for_package(resource, codebase, no_licenses):
110109
referenced_license_detections = get_license_detection_mappings(
111110
location=referenced_resource.location
112111
)
113-
_references = extract_license_rules_reference_data(
114-
license_detections=referenced_license_detections
115-
)
116112

117113
else:
118114
referenced_license_detections = referenced_resource.license_detections
@@ -353,9 +349,6 @@ def get_license_detections_from_sibling_file(resource, codebase, no_licenses):
353349
analysis=DetectionCategory.PACKAGE_ADD_FROM_SIBLING_FILE.value,
354350
post_scan=True,
355351
)
356-
_references = extract_license_rules_reference_data(
357-
license_detections=detections,
358-
)
359352
license_detections.extend(detections)
360353
else:
361354
license_detections.extend(sibling.license_detections)

src/packagedcode/plugin_package.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from licensedcode.cache import build_spdx_license_expression
2626
from licensedcode.cache import get_cache
2727
from licensedcode.detection import DetectionRule
28-
from licensedcode.licenses_reference import extract_license_rules_reference_data
2928
from packagedcode import get_package_handler
3029
from packagedcode.licensing import add_referenced_license_matches_for_package
3130
from packagedcode.licensing import add_referenced_license_detection_from_package
@@ -221,9 +220,6 @@ def add_license_from_file(resource, codebase, no_licenses):
221220

222221
if no_licenses:
223222
license_detections_file = get_license_detection_mappings(location=resource.location)
224-
_references = extract_license_rules_reference_data(
225-
license_detections=license_detections_file,
226-
)
227223
else:
228224
license_detections_file = resource.license_detections
229225

0 commit comments

Comments
 (0)