File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -71,15 +71,16 @@ def licenses(self, value):
7171 if value :
7272 max_length_exceed = False
7373 for new_lic in value :
74- if len (new_lic ) > MAX_LICENSE_LENGTH :
75- new_lic = new_lic [:MAX_LICENSE_LENGTH ]
76- max_length_exceed = True
77- if new_lic not in self ._licenses :
78- self ._licenses .append (new_lic )
79- if len ("," .join (self ._licenses )) > MAX_LICENSE_TOTAL_LENGTH :
80- self ._licenses .remove (new_lic )
74+ if new_lic :
75+ if len (new_lic ) > MAX_LICENSE_LENGTH :
76+ new_lic = new_lic [:MAX_LICENSE_LENGTH ]
8177 max_length_exceed = True
82- break
78+ if new_lic not in self ._licenses :
79+ self ._licenses .append (new_lic )
80+ if len ("," .join (self ._licenses )) > MAX_LICENSE_TOTAL_LENGTH :
81+ self ._licenses .remove (new_lic )
82+ max_length_exceed = True
83+ break
8384 if max_length_exceed and (SUBSTRING_LICENSE_COMMENT not in self .comment ):
8485 self .comment = f"{ self .comment } / { SUBSTRING_LICENSE_COMMENT } " if self .comment else SUBSTRING_LICENSE_COMMENT
8586
You can’t perform that action at this time.
0 commit comments