Skip to content

chore: clean package static-analysis findings#611

Open
shawcharles wants to merge 1 commit into
igerber:mainfrom
shawcharles:chore/package-ruff-cleanup
Open

chore: clean package static-analysis findings#611
shawcharles wants to merge 1 commit into
igerber:mainfrom
shawcharles:chore/package-ruff-cleanup

Conversation

@shawcharles

Copy link
Copy Markdown
Contributor

Closes #606.

Summary

  • declare the ResolvedSurveyDesign forward reference in bootstrap_utils.py under TYPE_CHECKING
  • remove no-placeholder f-strings from power.py
  • remove the stale invalid # noqa: WPS433 marker from spillover.py while preserving the deferred-import note
  • remove audited unused locals where the computed value has no downstream use
  • document intentionally omitted symmetric DRDID grid entries in staggered.py
  • add an Unreleased changelog entry

Scope

This intentionally does not touch:

  • public API re-exports / F401
  • TROP import ordering / E402
  • broad import sorting / I001
  • honest_did.py mathematical l names / E741
  • CI gates

Validation

  • python -m ruff check diff_diff --select F821,F541,F841,W --output-format=concise
  • python3.9 -m py_compile diff_diff/bootstrap_utils.py diff_diff/power.py diff_diff/spillover.py diff_diff/chaisemartin_dhaultfoeuille.py diff_diff/honest_did.py diff_diff/imputation.py diff_diff/prep_dgp.py diff_diff/staggered.py
  • git diff --check
  • PYTHONPATH=. DIFF_DIFF_BACKEND=python pytest tests/test_bootstrap_utils.py tests/test_bootstrap_chunking.py -q (74 passed)
  • 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 (1390 passed, 103 deselected)

@shawcharles shawcharles marked this pull request as ready for review July 4, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean package-source Ruff static-analysis findings

1 participant