diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index eb139c93..75bb49fd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -39,7 +39,7 @@ jobs: with: python-version: '3.14' - name: Install pinned linters (keep in sync with pyproject [dev]) - run: pip install ruff==0.15.21 black==26.5.1 + run: pip install ruff==0.16.0 black==26.5.1 - name: Ruff run: ruff check diff_diff tests - name: Black diff --git a/CHANGELOG.md b/CHANGELOG.md index d7d678f5..5916b483 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 three modes now dispatch, and `"error"` raises naming the skipped pairs. ### Changed +- **Internal: `ruff` dev-tooling pin bumped `0.15.21` -> `0.16.0`** (Dependabot + + manual `lint.yml` sync). 0.16.0 expands ruff's *default* rule selection from + 59 rules across 2 linter families to **413 across 38** (`B`, `PL*`, `PYI`, + `RUF`, `SIM`, `UP`, ...). This repo is insulated because + `[tool.ruff.lint] select = ["E", "F", "I", "W"]` is explicit: the resolved set + is the same **68 rules** under both pins (17 `E`, 43 `F`, 2 `I`, 6 `W`, per + `ruff check --show-settings`), and 0.16.0's three preview-to-stable promotions + (`FURB164`, `FURB192`, `ISC004`) fall outside those families. + `ruff check diff_diff tests` and `black --check` are clean on both pins. + **That explicit `select` is load-bearing** - dropping it to inherit ruff's + defaults would now enable ~7x more rules. - **`WooldridgeDiD` now raises when rank reduction removes any requested cohort×time cell**, instead of reporting the survivors under their original `ATT(g,t)` labels. Once a cell is dropped, the remaining coefficients diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b86df4f4..379a0962 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,6 +19,12 @@ mypy diff_diff Refresh with `pip install -e ".[dev]"`. The pinned tools require Python >= 3.10 (dev tooling only; the library itself still supports Python 3.9). +- `[tool.ruff.lint] select = ["E", "F", "I", "W"]` is deliberately explicit and + is **load-bearing**, not a restatement of ruff's defaults. Ruff 0.16.0 expanded + its default selection from 59 rules to 413 across 38 linter families; the + explicit `select` is what keeps a ruff upgrade from silently enabling hundreds + of new rules. Do not drop it to inherit the defaults. Widening the rule set is + a deliberate PR of its own. - `[tool.ruff.lint.per-file-ignores]` entries are deliberate (trop logger-before-imports E402, honest_did math-notation `l` E741, `__init__` re-export F401, conftest import ordering E402). Do not "fix" those patterns diff --git a/pyproject.toml b/pyproject.toml index d3170d07..7377dd60 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,7 @@ dev = [ # NOTE: black/mypy require Python >= 3.10 (dev tooling only; the library # floor stays 3.9). "black==26.5.1", - "ruff==0.15.21", + "ruff==0.16.0", "mypy==2.3.0", "maturin>=1.4,<2.0", "matplotlib>=3.5",