Skip to content

ci: fix all ruff findings, enforce ruff, document the step#85

Merged
kurok merged 1 commit into
masterfrom
ruff-fix-and-enforce
Jun 12, 2026
Merged

ci: fix all ruff findings, enforce ruff, document the step#85
kurok merged 1 commit into
masterfrom
ruff-fix-and-enforce

Conversation

@kurok

@kurok kurok commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Fixes every ruff check finding on master and makes the CI ruff gate blocking.

Fixed (13 findings)

  • I001 import ordering — __init__.py, conftest.py, generate_rfc_corpus.py, test_attachments.py
  • UP006 / UP007 typing modernization — the public stub __init__.pyi now uses list/dict/str | bytes (and drops the typing import); same in tests
  • UP015 redundant open(..., 'r') mode — conftest.py
  • E501 long line — test_attachments.py (wrapped, logic unchanged)

Enforced + documented

  • test.yml: dropped continue-on-error from the ruff step → blocking (config in ruff.toml).
  • CONTRIBUTING.md: added ruff check --fix . as a pre-PR step; corrected the lint table (mypy is --strict + blocking; ruff now blocking).

Also

Verified locally: ruff check . clean, mypy --strict passes, full suite 91 passed.

Fix every ruff finding on master — import ordering (I001), typing modernization
to builtin generics and X|Y unions (UP006/UP007), redundant open mode (UP015),
and a long line (E501) — across the package and tests. The public stub now
uses list/dict/str|bytes; mypy --strict still passes.

Flip the CI ruff step from advisory to blocking (config in ruff.toml) and add
`ruff check --fix` to CONTRIBUTING. Also sync Cargo.lock to 0.4.0 (left stale
by the version bump in #83).

Signed-off-by: yuriyryabikov <22548029+kurok@users.noreply.github.com>
@kurok kurok merged commit e6e1aca into master Jun 12, 2026
7 checks passed
@kurok kurok deleted the ruff-fix-and-enforce branch June 12, 2026 21:39
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.

1 participant