File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -240,9 +240,12 @@ def build_index(
240240 if not licenses_db :
241241 # combine the licenses in these additional directories with the licenses in the original DB
242242 additional_license_dirs = get_license_dirs (additional_dirs = additional_directories )
243- combined_license_directories = [licenses_data_dir ] + additional_license_dirs
244243 # generate a single combined license db with all licenses
245- licenses_db = load_licenses_from_multiple_dirs (license_dirs = combined_license_directories )
244+ licenses_db = load_licenses_from_multiple_dirs (
245+ builtin_license_data_dir = licenses_data_dir ,
246+ additional_license_data_dirs = additional_license_dirs ,
247+ with_deprecated = False ,
248+ )
246249
247250 # if we have additional directories, extract the rules from them
248251 additional_rule_dirs = get_rule_dirs (additional_dirs = additional_directories )
Original file line number Diff line number Diff line change 3838from licensedcode .frontmatter import dumps_frontmatter
3939from licensedcode .frontmatter import load_frontmatter
4040from licensedcode .languages import LANG_INFO as known_languages
41+ from licensedcode .tokenize import get_existing_required_phrase_spans
4142from licensedcode .tokenize import index_tokenizer
4243from licensedcode .tokenize import index_tokenizer_with_stopwords
4344from licensedcode .tokenize import query_lines
@@ -890,6 +891,7 @@ def get_license_dirs(additional_dirs):
890891 Return a list of all subdirectories containing license files within the
891892 input list of additional directories. These directories do not have to be absolute paths.
892893 """
894+ additional_dirs = additional_dirs or []
893895 return [f"{ str (Path (path ).absolute ())} /licenses" for path in additional_dirs ]
894896
895897
@@ -898,6 +900,7 @@ def get_rule_dirs(additional_dirs):
898900 Return a list of all subdirectories containing rule files within the
899901 input list of additional directories. These directories do not have to be absolute paths.
900902 """
903+ additional_dirs = additional_dirs or []
901904 return [f"{ str (Path (path ).absolute ())} /rules" for path in additional_dirs ]
902905
903906
@@ -2295,7 +2298,6 @@ def build_required_phrase_spans(self):
22952298 Return a list of Spans marking required phrases token positions of that must
22962299 be present for this rule to be matched.
22972300 """
2298- from licensedcode .required_phrases import get_existing_required_phrase_spans
22992301 if self .is_from_license :
23002302 return []
23012303 try :
You can’t perform that action at this time.
0 commit comments