Skip to content

Commit 3a8a4ac

Browse files
committed
Format empirical_validation.py with Black
1 parent 68f4bcc commit 3a8a4ac

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

scripts/empirical_validation.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ def get_git_metrics(file_path: str) -> Optional[GitMetrics]:
103103
rel_path = os.path.relpath(file_path, project_root)
104104

105105
# Total commits
106-
log_output = run_git_command(
107-
["log", "--oneline", "--follow", "--", rel_path]
108-
)
106+
log_output = run_git_command(["log", "--oneline", "--follow", "--", rel_path])
109107
commits = [line for line in log_output.split("\n") if line.strip()]
110108
total_commits = len(commits)
111109

@@ -117,15 +115,11 @@ def get_git_metrics(file_path: str) -> Optional[GitMetrics]:
117115
fix_commits = sum(1 for c in commits if fix_pattern.search(c))
118116

119117
# Number of authors
120-
authors_output = run_git_command(
121-
["log", "--format=%ae", "--follow", "--", rel_path]
122-
)
118+
authors_output = run_git_command(["log", "--format=%ae", "--follow", "--", rel_path])
123119
authors = len(set(authors_output.split("\n"))) if authors_output else 1
124120

125121
# Lines changed (rough estimate via numstat)
126-
numstat_output = run_git_command(
127-
["log", "--numstat", "--format=", "--follow", "--", rel_path]
128-
)
122+
numstat_output = run_git_command(["log", "--numstat", "--format=", "--follow", "--", rel_path])
129123
lines_changed = 0
130124
for line in numstat_output.split("\n"):
131125
parts = line.split()
@@ -138,12 +132,8 @@ def get_git_metrics(file_path: str) -> Optional[GitMetrics]:
138132
pass
139133

140134
# First and last commit timestamps
141-
first_commit = run_git_command(
142-
["log", "--format=%ct", "--follow", "--reverse", "--", rel_path]
143-
)
144-
last_commit = run_git_command(
145-
["log", "-1", "--format=%ct", "--follow", "--", rel_path]
146-
)
135+
first_commit = run_git_command(["log", "--format=%ct", "--follow", "--reverse", "--", rel_path])
136+
last_commit = run_git_command(["log", "-1", "--format=%ct", "--follow", "--", rel_path])
147137

148138
import time
149139

0 commit comments

Comments
 (0)