Skip to content

Commit

Permalink
Merge pull request #3446 from csordasmarton/fix_blame_info_duplicatio…
Browse files Browse the repository at this point in the history
…n_warning

[client] Fix duplication warning when collecting blame info
  • Loading branch information
bruntib authored Oct 11, 2021
2 parents 66f69a7 + 4cb5dcd commit 4eea2d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions web/client/codechecker_client/blame_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from concurrent.futures import ProcessPoolExecutor
from git import Repo
from git.exc import InvalidGitRepositoryError
from typing import Dict, List, Optional
from typing import Dict, Iterable, Optional

from codechecker_common.logger import get_logger

Expand Down Expand Up @@ -74,7 +74,7 @@ def __get_blame_info(file_path: str):


def __collect_blame_info_for_files(
file_paths: List[str],
file_paths: Iterable[str],
zip_iter=map
) -> FileBlameInfo:
""" Collect blame information for the given file paths. """
Expand All @@ -88,7 +88,7 @@ def __collect_blame_info_for_files(

def assemble_blame_info(
zip_file: zipfile.ZipFile,
file_paths: List[str]
file_paths: Iterable[str]
) -> bool:
"""
Collect and write blame information for the given files to the zip file.
Expand Down
4 changes: 2 additions & 2 deletions web/client/codechecker_client/cmd/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,13 +680,13 @@ def assemble_zip(inputs, zip_file, client):

zipf.write(ftc, zip_target)

collected_file_paths = []
collected_file_paths = set()
for f, h in file_to_hash.items():
if h in necessary_hashes or h in file_hash_with_review_status:
LOG.debug("File contents for '%s' needed by the server", f)

file_path = os.path.join('root', f.lstrip('/'))
collected_file_paths.append(f)
collected_file_paths.add(f)

try:
zipf.getinfo(file_path)
Expand Down

0 comments on commit 4eea2d5

Please sign in to comment.