Repository navigation
Conversation
Select FLY, FURB, I, PIE, PYI, RET, RSE, UP and W, and fix every finding: ruff's safe fixes (import sorting, pyupgrade), then by hand: - Nine v2 enums move from (str, Enum) to StrEnum; none is formatted with str() or format(), and storage and serialisation use the value. - RET504/PIE810 fixes reviewed; compare_economic_outputs returns None explicitly; __enter__ methods return Self. - Two type: ignore comments moved back onto their import lines after import sorting wrapped them. Alembic revisions are exempt from all lint rules (previously only F401): they must stay exactly as Alembic generates them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lint jobs now run ruff check ., and api.quality.ruff-lint moves from advisory to enforced with the codes selected in pyproject.toml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anth-volk
added this pull request to stack #3888
October 12, 2026 20:43
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## ci-scripts-deploy #3898 +/- ##
==================================================
Coverage 87.56% 87.56%
==================================================
Files 198 198
Lines 12211 12208 -3
Branches 2159 2159
==================================================
- Hits 10692 10690 -2
+ Misses 922 921 -1
Partials 597 597 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3897
Summary
Phase 1 step 1.8, group 1 of about 8: safe auto-fixes. Stacked on #3896.
ruff check .now runs in CI (lintjob inpr.ymlandpush.yml), using the ruff version pinned inuv.lock.selectgains FLY, FURB, I, PIE, PYI, RET, RSE, UP and W. Every finding is fixed, with no ratchet. About 620 were ruff's safe fixes (mostly import sorting and pyupgrade); the rest are below.(str, Enum)toStrEnum(UP042). None is formatted withstr()orformat(). SQLAlchemy and Pydantic store and serialise them by value, and theirrepris unchanged.RET504andPIE810fixes reviewed.compare_economic_outputsnow returnsNoneexplicitly. Two__enter__methods returnSelf.# type: ignoreonto the wrong line. They're back on the import line, and mypy passes.api.migration.alembic-autogenerated-only), and the revision tests check that. The hand-writtenenv.pyfiles are still linted.api.quality.ruff-lintmoves from advisory to enforced.Testing
pytest tests/unit tests/contract: 2,358 passed.ruff check .passes with 0.15.12 (pinned) and 0.16.8.ruff format --check .passes.🤖 Generated with Claude Code