Skip to content

Remove linting and formatting excludes and reformat - #400

Open
bjester wants to merge 5 commits into
release-v0.9.xfrom
reformatting-394
Open

bjester wants to merge 5 commits into
release-v0.9.xfrom
reformatting-394

Conversation

@bjester

@bjester bjester commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Summary

This PR removes every entry from [tool.ruff].exclude. Before, ruff skipped linting, import sorting and formatting for these files, even when a commit changed them.

The decision for each excluded path:

Path Decision Changes in this PR
morango/*/migrations/* Removed None. The pattern matched no files. Ruff already lints and formats morango/migrations/.
docs Removed Reformat of docs/conf.py, the only Python file.
morango/sync/operations.py Removed Reformat.
morango/sync/backends/postgres.py Removed Import sort, F522 fix, reformat.
morango/sync/backends/sqlite.py Removed Import sort, F522 fix, reformat.
tests/testapp/tests/test_crypto.py Removed Reformat.

The PR also removes the lint target from the Makefile. The target ran pre-commit, which is no longer a dependency. Run prek run --all-files instead.

TODO

  • Have tests been written for the new code? Not applicable. No behavior changes.
  • Has documentation been written/updated? Not applicable.
  • New dependencies (if any) added to requirements file. None.

Reviewer guidance

  • Commit ca41d10 contains only formatting and import sorting. I compared the AST of each file before and after this commit. The only differences are import order and removed u"" string prefixes, which have no effect in Python 3. No SQL string changed.
  • Commit 71beb39 is the only code change. It removes the unused rmc= keyword argument from two SQL .format() calls. Neither query contains {rmc}.
  • Merge this PR with a merge commit. Do not squash or rebase it. .git-blame-ignore-revs contains the full SHA of ca41d10, and a squash or rebase changes that SHA.
  • With blame.ignoreRevsFile set, git blame shows the earlier authors for the reformatted files. Two lines still show ca41d10: a blank line in sqlite.py and a closing ) in test_crypto.py. The formatter added these lines, so they have no earlier author.

Test results:

  • SQLite: 643 passed, 2 skipped.
  • PostgreSQL: 637 passed, 8 skipped.
  • prek run --all-files passes.

Issues addressed

Closes #394

Documentation

None.

AI usage

I used Claude Code to make the changes, with the evaluation in #394 as the plan. Claude Code measured the effect of each exclude, split the work into separate commits for the code fix and the reformat, and compared the ASTs to show that the reformat changes no behavior. It also ran the test suite on SQLite and PostgreSQL, and drafted this description. I reviewed the changes before I opened the PR.

🤖 Generated with Claude Code

@bjester
bjester marked this pull request as ready for review October 23, 2026 19:33
@bjester
bjester requested review from a team, leq-bot and rtibblesbot October 23, 2026 19:33
@rtibblesbot

rtibblesbot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Waiting for changes

Outcome: skipped — rebased to ecf390e, no content changes

Last updated: 2026-10-24 21:56 UTC

@rtibblesbot rtibblesbot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PR #400: no findings.

  • The rmc= removal leaves the generated SQL unchanged. Neither merge-conflict template has an {rmc} placeholder.
  • Apart from that removal and dropped u"" prefixes, the reformatted files' ASTs are unchanged.
  • ruff check and ruff format --check pass on the whole tree.

CI is still pending, so this is a COMMENT, not an approval.

Next step: This is a low-risk change; it needs a light-touch code review by a human engineer.


Written by rtibblesbot, an LLM-based coding agent.

@bjester
bjester added this pull request to stack #402 October 23, 2026 20:47
bjester and others added 5 commits October 23, 2026 14:35
Neither query references {rmc}, so ruff flags the keyword as F522.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Formatting and import sorting only, produced by ruff 0.15.16 with the
project config. No behavior change: each file's AST is unchanged apart
from import order and dropped u"" string prefixes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The list predates ruff. It came from the flake8 config with no recorded
reason, and with ruff it also skipped import sorting and formatting.
The migrations pattern matched no files.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It ran pre-commit, which the project replaced with prek. Run
`prek run --all-files` instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

Lint and format the files excluded from ruff

2 participants