6060from license_expression ._pyahocorasick import Trie as AdvancedTokenizer
6161from license_expression ._pyahocorasick import Token
6262
63-
6463# append new error codes to PARSE_ERRORS by monkey patching
6564PARSE_EXPRESSION_NOT_UNICODE = 100
6665if PARSE_EXPRESSION_NOT_UNICODE not in PARSE_ERRORS :
@@ -594,13 +593,13 @@ def dedup(self, expression):
594593 for arg in exp .args :
595594 if isinstance (arg , (self .AND , self .OR )):
596595 # Run this recursive function if there is another AND/OR expression
597- # and add the expression to the expression_list.
596+ # and add the expression to the expression_list.
598597 expression_list .append (self .dedup (arg ))
599598 else :
600599 # Get the license key from the expression as a list.
601600 exp_key = self .license_keys (arg )
602601 # We treat the license with exception as a single license key so
603- # that it won't over de-dupped for case such as
602+ # that it won't over de-dupped for case such as
604603 # gpl-2.0 WITH classpath exception AND gpl-2.0
605604 if type (arg ).__name__ == 'LicenseWithExceptionSymbol' :
606605 key = ' WITH ' .join (exp_key )
@@ -1405,6 +1404,7 @@ def validate_symbols(symbols, validate_keys=False):
14051404
14061405 return warnings , errors
14071406
1407+
14081408def combine_expressions (expressions , relation = 'AND' , licensing = Licensing ()):
14091409 """
14101410 Return a combined license expression string with relation, given a list of
@@ -1438,4 +1438,4 @@ def combine_expressions(expressions, relation='AND', licensing=Licensing()):
14381438 if relation == 'OR' :
14391439 return str (licensing .OR (* expressions ))
14401440 else :
1441- return str (licensing .AND (* expressions ))
1441+ return str (licensing .AND (* expressions ))
0 commit comments