From 76a811107a4e8a5855bec1c119bb24fdacb6af21 Mon Sep 17 00:00:00 2001 From: adii21-Ux Date: Wed, 29 Dec 2021 00:09:49 +0530 Subject: [PATCH 1/2] fix docstring in debain_copyright.py Signed-off-by: adii21-Ux --- src/packagedcode/debian_copyright.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/packagedcode/debian_copyright.py b/src/packagedcode/debian_copyright.py index ae075550e7d..3ce781d9645 100644 --- a/src/packagedcode/debian_copyright.py +++ b/src/packagedcode/debian_copyright.py @@ -371,8 +371,8 @@ def license_matches(self): def get_primary_license(self): """ - Return a license expression string which is the primary license for the - debian copyright file. + Get a license expression string which is the primary license for the + debian copyright file and assign it to `primary_license`. A primary license in a debian copyright file is the license in the Header paragraph or the `Files: *` paragraph. From fdfe74fc6b5a46a454c6cb0d348813c21d04fb09 Mon Sep 17 00:00:00 2001 From: adii21-Ux Date: Thu, 30 Dec 2021 19:13:50 +0530 Subject: [PATCH 2/2] made changes Signed-off-by: adii21-Ux --- src/packagedcode/debian_copyright.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/packagedcode/debian_copyright.py b/src/packagedcode/debian_copyright.py index 3ce781d9645..377f3876ddc 100644 --- a/src/packagedcode/debian_copyright.py +++ b/src/packagedcode/debian_copyright.py @@ -349,7 +349,7 @@ def from_file(cls, location, check_consistency=False): dc = cls(location=location, debian_copyright=debian_copyright) dc.detect_license() dc.detect_copyrights() - dc.get_primary_license() + dc.set_primary_license() if check_consistency: dc.consistentcy_errors = edc.get_consistentcy_errors() @@ -369,10 +369,10 @@ def license_matches(self): ) return chain.from_iterable(matches) - def get_primary_license(self): + def set_primary_license(self): """ - Get a license expression string which is the primary license for the - debian copyright file and assign it to `primary_license`. + Compute and set the primary license expression of this + debian copyright file to`primary_license`. A primary license in a debian copyright file is the license in the Header paragraph or the `Files: *` paragraph.