add seal5.backend.report.diff #383
GitHub Actions / Black
failed
Oct 31, 2024 in 0s
3 errors
Black found 3 errors
Annotations
Check failure on line 67 in /home/runner/work/seal5/seal5/seal5/backends/report/diff/writer.py
github-actions / Black
/home/runner/work/seal5/seal5/seal5/backends/report/diff/writer.py#L56-L67
assert isinstance(stage_metrics, dict)
if stage_name == "deploy":
n_files_changed = stage_metrics.get("n_files_changed", None)
n_insertions = stage_metrics.get("n_insertions", None)
n_deletions = stage_metrics.get("n_deletions", None)
- new = {"phase": "*", "n_files_changed": n_files_changed, "n_insertions": n_insertions, "n_deletions": n_deletions}
+ new = {
+ "phase": "*",
+ "n_files_changed": n_files_changed,
+ "n_insertions": n_insertions,
+ "n_deletions": n_deletions,
+ }
ret.append(new)
continue
if stage_name != "patch":
continue
phases = stage_metrics.get("stages", None)
Check failure on line 83 in /home/runner/work/seal5/seal5/seal5/backends/report/diff/writer.py
github-actions / Black
/home/runner/work/seal5/seal5/seal5/backends/report/diff/writer.py#L69-L83
assert isinstance(phases, dict)
for phase_name, phase_metrics in phases.items():
n_files_changed = phase_metrics.get("n_files_changed", None)
n_insertions = phase_metrics.get("n_insertions", None)
n_deletions = phase_metrics.get("n_deletions", None)
- new = {"phase": phase_name, "n_files_changed": n_files_changed, "n_insertions": n_insertions, "n_deletions": n_deletions}
+ new = {
+ "phase": phase_name,
+ "n_files_changed": n_files_changed,
+ "n_insertions": n_insertions,
+ "n_deletions": n_deletions,
+ }
ret.append(new)
return ret
-
diff_data = process_metrics(settings)
diff_df = pd.DataFrame(diff_data)
Check failure on line 794 in /home/runner/work/seal5/seal5/seal5/flow.py
github-actions / Black
/home/runner/work/seal5/seal5/seal5/flow.py#L783-L794
base_tag = f"seal5-{self.name}-base"
if int(stage) > 0:
prev_tag = f"seal5-{self.name}-stage{int(stage)-1}"
else:
prev_tag = base_tag
- n_files_changed, n_insertions, n_deletions = inject_patches.analyze_diff(self.repo, cur=tag_name, base=prev_tag)
+ n_files_changed, n_insertions, n_deletions = inject_patches.analyze_diff(
+ self.repo, cur=tag_name, base=prev_tag
+ )
stage_metrics = {}
stage_metrics["n_files_changed"] = n_files_changed
stage_metrics["n_insertions"] = n_insertions
stage_metrics["n_deletions"] = n_deletions
stages_metrics[PatchStage(stage).name] = stage_metrics
Loading