Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Fix behavior of map operations for Python3 - which returns iterator instead of a collection #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gofedlib/go/contentmetadataextractor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
from lib.utils import runCommand
from gofedlib.utils import runCommand

class ContentMetadataExtractor(object):

Expand Down
9 changes: 5 additions & 4 deletions gofedlib/go/symbolsextractor/extractor.py
Original file line number Diff line number Diff line change
@@ -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):
"""
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gofedlib/providers/providerbuilder.py
Original file line number Diff line number Diff line change
@@ -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):

Expand Down