Files

139 lines
4.7 KiB
Plaintext

=== append_only_audit.py (498 lines, 20 funcs) ===
listcomp with if-filter x1
manual +=1 count x8
repeated x5: print("", file=out)
=== census_row_delta.py (510 lines, 14 funcs) ===
manual +=1 count x2
repeated x3: for k in d["removed"]:
repeated x3: for k in d["added"]:
=== check_lint.py (574 lines, 11 funcs) ===
manual +=1 count x12
repeated x10: # --------------------------------------------------------------------------
=== checkin_check.py (949 lines, 24 funcs) ===
sum(1 for ...) x3
listcomp with if-filter x9
manual +=1 count x5
repeated x3: for line in text.splitlines():
repeated x3: with open(path, "r", encoding="utf-8") as fh:
repeated x3: except ValueError:
repeated x4: except OSError as exc:
=== citation_hash_class.py (454 lines, 10 funcs) ===
.count() calls x1
manual +=1 count x8
repeated x3: bad += 0 if ok else 1
=== doc_census_check.py (1861 lines, 34 funcs) ===
sum(1 for ...) x1
manual +=1 count x3
repeated x4: "print('widgets: 7')\n")
repeated x3: json.dump({"rev": "abc1234",
repeated x5: run_gate("--tools", "tools/stub_split.py", "--no-run",
repeated x3: out = p.stdout.decode("utf-8", "replace")
repeated x3: err = p.stderr.decode("utf-8", "replace")
=== doc_command_check.py (468 lines, 14 funcs) ===
listcomp with if-filter x5
repeated x3: capture_output=True, text=True)
=== gate_blame.py (540 lines, 17 funcs) ===
listcomp with if-filter x1
.count() calls x1
repeated x3: here = os.path.dirname(os.path.abspath(__file__))
repeated x4: if proc.returncode != 0:
repeated x3: fh.write("# empty ledger\n")
=== landing_check.py (460 lines, 16 funcs) ===
listcomp with if-filter x1
manual +=1 count x2
repeated x4: rows.append(row)
repeated x3: rows = build_rows(repo, rev1, "main", forge, ["tools/a.py"])
repeated x3: with open(os.path.join(served, "tools/a.py"), "wb") as fh:
=== path_claim_check.py (892 lines, 24 funcs) ===
listcomp with if-filter x4
manual +=1 count x6
repeated x6: subprocess.run(["git", "-C", repo, "add", "-A"], capture_output=True)
repeated x3: subprocess.run(["git", "-C", repo, "-c", "user.email=t@t", "-c", "user.name=t",
repeated x5: "rc=%d %s" % (rc, out[-300:]))
repeated x4: with open(q, "w") as fh:
=== queue_append_audit.py (549 lines, 18 funcs) ===
listcomp with if-filter x3
repeated x3: s, _ = out_text(rc, out, b"")
repeated x3: row.update(verdict="UNGRADABLE",
repeated x5: _sh(repo, "git", "add", "-A")
repeated x3: with open(queue, "a", encoding="utf-8") as fh:
=== queue_claim_check.py (1079 lines, 21 funcs) ===
sum(1 for ...) x2
len([...]) x1
listcomp with if-filter x11
manual +=1 count x3
repeated x12: # --------------------------------------------------------------------------
repeated x3: s = strip_code(line)
repeated x3: for n, l in enumerate(lines, 1):
repeated x3: lines = text.splitlines()
repeated x3: for r in records:
=== queue_index.py (900 lines, 17 funcs) ===
manual +=1 count x4
repeated x3: for i, ln in enumerate(lines, 1):
repeated x12: lines.append("")
repeated x9: buf = io.StringIO()
repeated x9: with contextlib.redirect_stdout(buf):
repeated x10: rc = run(argparse.Namespace(repo=repo, queue="WORK-QUEUE.md", index=False,
=== reply_check.py (881 lines, 22 funcs) ===
sum(1 for ...) x1
listcomp with if-filter x3
.count() calls x1
manual +=1 count x2
repeated x3: s = line.strip()
repeated x5: for row in rows:
repeated x3: file=sys.stderr)
repeated x3: with contextlib.redirect_stdout(io.StringIO()):
repeated x3: buf = io.StringIO()
=== selftest_sweep.py (1176 lines, 24 funcs) ===
sum(1 for ...) x3
listcomp with if-filter x12
repeated x4: 2, "cannot read repo"),
repeated x4: 2, "not a git work tree"),
repeated x6: except OSError as exc:
repeated x3: results.append(rec)
repeated x4: with tempfile.TemporaryDirectory() as td:
=== served_drift_check.py (522 lines, 22 funcs) ===
sum(1 for ...) x2
listcomp with if-filter x5
manual +=1 count x4
repeated x5: rows = run(repo, "HEAD", base)
repeated x4: except GradeError as e:
=== tool_map.py (642 lines, 16 funcs) ===
sum(1 for ...) x2
listcomp with if-filter x1
repeated x3: except OSError as exc:
=== verify.py (1019 lines, 16 funcs) ===
listcomp with if-filter x3
manual +=1 count x3
repeated x6: capture_output=True, text=True)
repeated x3: c = counts(rows)
repeated x9: rc, out = _verify("--repo", repo)
repeated x9: rc, out = _verify("--repo", repo, "--fast")
repeated x5: seen = open(av).read() if os.path.exists(av) else ""
=== write_probe.py (734 lines, 12 funcs) ===
sum(1 for ...) x1
len([...]) x3
listcomp with if-filter x2
repeated x3: "--json", "{target}"]),
repeated x3: rows.append(rec)
repeated x4: except OSError as exc: