Skip to content

enable all ruff rules with curated ignores and fix violations#30

Merged
MatrixEditor merged 3 commits intoMatrixEditor:masterfrom
StrongWind1:update/ruff
Mar 14, 2026
Merged

enable all ruff rules with curated ignores and fix violations#30
MatrixEditor merged 3 commits intoMatrixEditor:masterfrom
StrongWind1:update/ruff

Conversation

@StrongWind1
Copy link
Copy Markdown
Contributor

Summary

  • Configure ruff to select ALL lint rules with a curated ignore list tailored for protocol/security tooling code
  • Apply safe auto-fixes (119 violations) and manually fix remaining 66 violations
  • No inline noqa directives — all ignores centralized in pyproject.toml with official linter group names and rationale comments
  • Fix a real bug: threading.Lock() created inside with statement in msrpc/rpc.py had no effect (lock was immediately discarded)

Changes

  • pyproject.toml: select = ["ALL"] with 40+ ignored rules organized by linter group
  • Bug fix: msrpc/rpc.py — store lock as self._conn_lock so it persists across calls
  • Safety: datetime.now() → datetime.now(tz=UTC) in 4 locations
  • Cleanup: raise Exception → ValueError/RuntimeError, raise e → bare raise, try/except/pass → contextlib.suppress, list comprehensions, implicit string concat in logging
  • No logic changes other than the lock fix

Select ALL ruff lint rules with a curated ignore list for protocol code
conventions, then apply safe auto-fixes across the codebase.
Copy link
Copy Markdown
Owner

@MatrixEditor MatrixEditor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MatrixEditor MatrixEditor merged commit 937d364 into MatrixEditor:master Mar 14, 2026
5 checks passed
@StrongWind1 StrongWind1 deleted the update/ruff branch March 15, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants