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

Several small fixes #9

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/changeutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ def get_changed_files(diff: str, suffix=".py") -> Dict[str, Set[int]]:
elif file_diff_lines[1].startswith("similarity"):
assert file_diff_lines[2].startswith("rename")
assert file_diff_lines[3].startswith("rename")
if len(file_diff_lines) == 4:
continue # skip file renames \wo any changes
assert file_diff_lines[4].startswith("index")
assert file_diff_lines[5].startswith("--- a/")
assert file_diff_lines[6].startswith("+++ b/")
Expand Down
6 changes: 3 additions & 3 deletions src/graph_generator/extract_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ def explore_files(
if not os.path.isfile(file_path):
continue
with open(file_path, encoding="utf-8", errors="ignore") as f:
monitoring.increment_count()
monitoring.enter_file(file_path)

# import pdb; pdb.set_trace()
if file_path[len(root_dir) :] not in files_to_extract:
continue

monitoring.increment_count()
monitoring.enter_file(file_path)

graph = build_graph(f.read(), monitoring, type_lattice)
if graph is None or len(graph["supernodes"]) == 0:
continue
Expand Down