diff --git a/gofedlib/go/contentmetadataextractor.py b/gofedlib/go/contentmetadataextractor.py index b3d45cf..34642e1 100644 --- a/gofedlib/go/contentmetadataextractor.py +++ b/gofedlib/go/contentmetadataextractor.py @@ -1,5 +1,5 @@ import os -from lib.utils import runCommand +from gofedlib.utils import runCommand class ContentMetadataExtractor(object): diff --git a/gofedlib/go/symbolsextractor/extractor.py b/gofedlib/go/symbolsextractor/extractor.py index a1bc548..43682b3 100644 --- a/gofedlib/go/symbolsextractor/extractor.py +++ b/gofedlib/go/symbolsextractor/extractor.py @@ -1,10 +1,10 @@ import os import logging import json -from lib.utils import getScriptDir, runCommand +from gofedlib.utils import getScriptDir, runCommand from .coder import GoTypeCoder from ..contentmetadataextractor import ContentMetadataExtractor -from lib.types import ExtractionError +from gofedlib.types import ExtractionError class GoSymbolsExtractor(object): """ @@ -295,7 +295,8 @@ def extract(self): if dir_key not in test_directory_dependencies: test_directory_dependencies[dir_key] = [] - test_directory_dependencies[dir_key] = test_directory_dependencies[dir_key] + map(lambda p: str(p["path"]), go_file_json["imports"]) + import_paths = [str(p["path"]) for p in go_file_json["imports"]] + test_directory_dependencies[dir_key] = test_directory_dependencies[dir_key] + import_paths test_directories.append(dir_info['dir']) continue @@ -325,7 +326,7 @@ def extract(self): # build can contain two different prefixes # but with the same package name. prefix = dir_info["dir"] + ":" + pkg_name - i_paths = map(lambda i: i["path"], go_file_json["imports"]) + i_paths = [i["path"] for i in go_file_json["imports"]] if prefix not in jsons: jsons[prefix] = [go_file_json] package_imports[prefix] = i_paths diff --git a/gofedlib/providers/providerbuilder.py b/gofedlib/providers/providerbuilder.py index f1cebdd..b574f43 100644 --- a/gofedlib/providers/providerbuilder.py +++ b/gofedlib/providers/providerbuilder.py @@ -1,7 +1,7 @@ from .upstreamprovider import UpstreamProvider import os import json -from lib.utils import getScriptDir +from gofedlib.utils import getScriptDir class ProviderBuilder(object):