Skip to content

Commit bc835e0

Browse files
CM-55207-Ruff format
1 parent 8bd3e66 commit bc835e0

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

cycode/cli/files_collector/commit_range_documents.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ def collect_commit_range_diff_documents(
7171
normalized_commit_range = normalize_commit_range(commit_range, path)
7272

7373
total_commits_count = int(repo.git.rev_list('--count', normalized_commit_range))
74-
logger.debug('Calculating diffs for %s commits in the commit range %s',
75-
total_commits_count, normalized_commit_range)
74+
logger.debug(
75+
'Calculating diffs for %s commits in the commit range %s', total_commits_count, normalized_commit_range
76+
)
7677

7778
progress_bar.set_section_length(ScanProgressBarSection.PREPARE_LOCAL_FILES, total_commits_count)
7879

@@ -100,7 +101,12 @@ def collect_commit_range_diff_documents(
100101

101102
logger.debug(
102103
'Found all relevant files in commit %s',
103-
{'path': path, 'commit_range': normalized_commit_range, 'commit_id': commit_id},
104+
{
105+
'path': path,
106+
'commit_range': commit_range,
107+
'normalized_commit_range': normalized_commit_range,
108+
'commit_id': commit_id,
109+
},
104110
)
105111

106112
logger.debug('List of commit ids to scan, %s', {'commit_ids': commit_ids_to_scan})
@@ -471,6 +477,7 @@ def parse_commit_range(commit_range: str, path: str) -> tuple[Optional[str], Opt
471477
logger.warning("Failed to parse commit range '%s'", commit_range, exc_info=e)
472478
return None, None, None
473479

480+
474481
def normalize_commit_range(commit_range: str, path: str) -> str:
475482
"""Normalize a commit range string to handle various formats consistently with all scan types.
476483
@@ -479,10 +486,7 @@ def normalize_commit_range(commit_range: str, path: str) -> str:
479486
"""
480487
from_commit_rev, to_commit_rev, separator = parse_commit_range(commit_range, path)
481488
if from_commit_rev is None or to_commit_rev is None:
482-
logger.warning(
483-
'Failed to parse commit range "%s", falling back to raw string.',
484-
commit_range
485-
)
489+
logger.warning('Failed to parse commit range "%s", falling back to raw string.', commit_range)
486490
return commit_range
487491

488492
# Construct a normalized range string using the original separator for iter_commits

0 commit comments

Comments
 (0)