Repository navigation
refactor(backend): fix remaining ruff findings and enforce full ruff check - #113
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
Clears the 163 Ruff findings left after #112 and turns on the full
ruff checkin CI and the pre-commit hook, so the backend stays at zero findings.No API behavior changes; the
/join/OpenAPI spec is identical tomain.What changed
Backend
Logic
B008: therequire_*permission dependencies are marked safe in defaults (77 false positives).B008:# noqaonPOST /join/'sJoinRedeemRequest()default; FastAPI deep-copies body defaults per request, so it is never shared.B904: 52 re-raises insideexceptblocks now chain withfrom e, orfrom Nonewhere the error was already discarded (mostlyIntegrityError→ 409).HTTPExceptiononly serializesdetail, and the app has no debug mode or custom handlers.B905:zip(..., strict=True)on 7 pairings that must line up (roster rows with their responses, staff-invite results with their inputs).B905: the shift-overlap check usesitertools.pairwise;sheets_serviceuses an explicitstrict=False, keeping its current dropping of cells past the header row.B023:collect_active_field_errorsbuilds its per-field checks withfunctools.partialinstead of lambdas.type_changedinforms.py, unused imports, and the unusedtournamentargument toapply_display_config.get_scoped_or_404uses[T]generic syntax instead of a module-levelTypeVar.Tests
test_get_membership_surface_hides_availability_dayto..._track; availability has been keyed by track since72dde4c7.Repo
ruff check .andruff format --check .before pytest.ruff check --fix, then formats, and blocks on anything that can't be fixed automatically.Out of scope
models.pytoMapped[]style.Test plan
pytestpasses locallyAutomated
ruff check .andruff format --check .pass with zero findings.Manual
/join/OpenAPI schema withmain: identical.