I noticed a small set of package-source Ruff/static-analysis findings that can be cleaned without changing public API or estimator behaviour.
Current prepared scope:
- declare the
ResolvedSurveyDesign forward reference in diff_diff/bootstrap_utils.py under TYPE_CHECKING, removing the package F821 failures;
- remove three no-placeholder f-strings in
diff_diff/power.py;
- remove an invalid
# noqa: WPS433 marker in diff_diff/spillover.py that Ruff warns about because WPS433 is not a configured Ruff rule;
- remove audited unused locals reported as
F841 where the value has no downstream use.
Explicitly out of scope:
- no public API re-export cleanup;
- no TROP import-order /
E402 changes;
- no broad import sorting;
- no
honest_did.py mathematical variable renames for E741;
- no CI gate.
Validation run locally:
python -m ruff check diff_diff --select F821,F541,F841,W --output-format=concise
python3.9 -m py_compile over the touched source files
PYTHONPATH=. DIFF_DIFF_BACKEND=python pytest tests/test_bootstrap_utils.py tests/test_bootstrap_chunking.py -q
PYTHONPATH=. DIFF_DIFF_BACKEND=python pytest tests/test_power.py tests/test_methodology_power.py tests/test_spillover.py tests/test_honest_did.py tests/test_methodology_honest_did.py tests/test_imputation.py tests/test_methodology_imputation.py tests/test_prep_dgp_reversible.py tests/test_staggered_rc.py tests/test_staggered.py tests/test_chaisemartin_dhaultfoeuille.py tests/test_dcdh_heterogeneity_cell_period_coverage.py -q
Would you accept a narrow PR with that boundary?
I noticed a small set of package-source Ruff/static-analysis findings that can be cleaned without changing public API or estimator behaviour.
Current prepared scope:
ResolvedSurveyDesignforward reference indiff_diff/bootstrap_utils.pyunderTYPE_CHECKING, removing the packageF821failures;diff_diff/power.py;# noqa: WPS433marker indiff_diff/spillover.pythat Ruff warns about becauseWPS433is not a configured Ruff rule;F841where the value has no downstream use.Explicitly out of scope:
E402changes;honest_did.pymathematical variable renames forE741;Validation run locally:
python -m ruff check diff_diff --select F821,F541,F841,W --output-format=concisepython3.9 -m py_compileover the touched source filesPYTHONPATH=. DIFF_DIFF_BACKEND=python pytest tests/test_bootstrap_utils.py tests/test_bootstrap_chunking.py -qPYTHONPATH=. DIFF_DIFF_BACKEND=python pytest tests/test_power.py tests/test_methodology_power.py tests/test_spillover.py tests/test_honest_did.py tests/test_methodology_honest_did.py tests/test_imputation.py tests/test_methodology_imputation.py tests/test_prep_dgp_reversible.py tests/test_staggered_rc.py tests/test_staggered.py tests/test_chaisemartin_dhaultfoeuille.py tests/test_dcdh_heterogeneity_cell_period_coverage.py -qWould you accept a narrow PR with that boundary?