Skip to content

Enable remaining Ruff rules - #405

Open
njzjz-bot wants to merge 1 commit into
deepmodeling:masterfrom
njzjz-bot:lint/issue-316-ruff-rules
Open

Enable remaining Ruff rules#405
njzjz-bot wants to merge 1 commit into
deepmodeling:masterfrom
njzjz-bot:lint/issue-316-ruff-rules

Conversation

@njzjz-bot

Copy link
Copy Markdown

Closes #316

Summary

  • Upgrade the Ruff pre-commit hooks to v0.16.0 and run both lint fixes and formatting.
  • Enable the requested D, UP, C4, TID251, TID253, T20, B904, N804, N805, and I rule sets.
  • Apply the resulting modernization, import, docstring, and exception-chaining fixes across the codebase.
  • Preserve dflow runtime artifact compatibility through a documented typing.List alias, because current pydflow rejects the equivalent PEP 585 list type.

Validation

  • ruff check .
  • ruff format --check dpgen2 tests docs/conf.py
  • python -m compileall -q dpgen2 tests
  • PYTHONPATH=tests pytest -q tests/op tests/fp tests/exploration tests/entrypoint with the unavailable optional fpop tests and the known collection script excluded: 153 passed
  • Broader suite with the same exclusions: 237 passed, 1 skipped; 22 integration tests require unavailable MinIO or localhost HTTP services
  • pre-commit itself is not installed in this environment; the Ruff hook commands were run directly

Coding agent: Codex
Codex version: codex-cli 0.149.0
Model: gpt-5.6-sol
Reasoning effort: xhigh

Coding-Agent: Codex
Codex-Version: codex-cli 0.149.0
Model: gpt-5.6-sol
Reasoning-Effort: xhigh
@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable Ruff rules

1 participant