chore: pin lint tooling + normalize source and hand-fixed test files (1/2)#677
Conversation
|
/ai-review |
pyproject: exact pins (black==26.3.1, ruff==0.15.13, mypy==2.1.0) in the dev extra + scoped per-file-ignores for deliberate patterns. diff_diff/ changes are the verbatim output of `ruff check diff_diff --fix` + `black diff_diff` at the pinned versions. mypy error count verified unchanged (184) pre/post. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lbd6nqWmg4snvvBmegwqiw
…ndings
Each of these files carries its mechanical black/ruff-fix changes PLUS the
hand fixes:
- F821: test_methodology_sdid.py missing typing imports for a local
annotation (latent NameError trap, not runtime)
- E402: test_rust_backend.py mid-file _rust_demean_map import hoisted
- E741: test_doc_snippets.py comprehension variable l -> ln
- F841 x26 audited individually:
* test_chaisemartin_dhaultfoeuille trends_nonparam_basic: r_plain was
computed but never asserted despite the comment promising both results
finite -> added the missing finiteness assertions
* test_se_accuracy influence_function_normalization: deleted the
abandoned R-style comparison block and rewrote the docstring to state
what the test actually asserts
* test_imputation always_treated_warning: removed the dead first two
data-construction attempts (kept the explanatory note)
* remaining sites: dropped dead locals, keeping side-effectful calls
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lbd6nqWmg4snvvBmegwqiw
f4f1824 to
6d77942
Compare
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment✅ Looks good — no unmitigated P0 or P1 findings. Executive Summary
MethodologyNo findings. Affected methods: none. The estimator-touching files in the supplied diff do not alter formulas, SE paths, inference gates, weights, assumptions, or defaults. The Code QualityNo findings. The suspected import/syntax issue in PerformanceNo findings. The source changes do not introduce new loops, allocations, estimator execution paths, or backend dispatch changes beyond mechanically split imports. Maintainability
Tech DebtNo findings. No new deferred methodology, correctness, or test debt is introduced by the reviewed diff. Existing deferred items remain tracked under SecurityNo findings. The supplied diff does not add secrets, credential handling, network behavior, or code execution surfaces. Documentation/Tests
|
…es (#679) Verbatim output of `ruff check tests --fix` + `black tests` at the pinned versions (black==26.3.1, ruff==0.15.13; pinned in #677) for the 37 test files with no hand edits: import sorts, f-string prefixes, unused-import removal, formatting. No assertion or fixture changes. Claude-Session: https://claude.ai/code/session_01Lbd6nqWmg4snvvBmegwqiw Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…docs - .github/workflows/lint.yml: runs `ruff check` + `black --check` at the pyproject-pinned versions on every PR push and on pushes to main. No ready-for-ci gate (precedent: ai_pr_review.yml), no paths filter (a required check whose workflow never triggers would block PRs forever). Aggregate "Lint Gate" job (if: always(), inspects needs.*.result) gives branch protection a single stable required-check name. Check-only. - .git-blame-ignore-revs: the #677/#679 normalization squash SHAs. - CONTRIBUTING.md "Linting and Formatting" section + CLAUDE.md note. - TestLintWorkflowPinSync: executable ruff/black pin-sync guard between lint.yml and the pyproject dev extra (review round-2 P3). - lint.yml added to rust-test.yml push/pull_request path filters, locked by PIN_SYNC_WORKFLOWS assertions; docs distinguish the current ruff/black mirroring from the future mypy CI job (round-3 P3s). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lbd6nqWmg4snvvBmegwqiw
Summary
devextra (black==26.3.1,ruff==0.15.13,mypy==2.1.0) so every machine and the upcoming Lint CI workflow judge cleanliness identically. The tools require Python >= 3.10 (dev tooling only; the library floor stays 3.9).[tool.ruff.lint.per-file-ignores]for deliberate patterns, each with a why-comment: trop* logger-before-imports (E402), honest_did Rambachan-Roth math notationl(E741),__init__backend re-export surface (F401), conftest sys.path ordering (E402), tutorial-quoted CdH horizon notation (E741).diff_diff/source (commit 1): verbatimruff check diff_diff --fix+black diff_diffoutput at the pinned versions.test_trends_nonparam_basicassertsr_plainfiniteness;test_influence_function_normalizationdrops an abandoned R-comparison block and gets an honest docstring).Reviewer note: commit 1's diff_diff/ changes are byte-reproducible with the two commands above; all judgment calls are in commit 2.
Methodology references (required if estimator / math changes)
diff_diff/)Validation
tests/test_openai_review.py -m ''(250 passed).Security / privacy
Generated with Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01Lbd6nqWmg4snvvBmegwqiw