fix(ci): resolve uat lint + typecheck failures (CAR-1340) #47

Merged
Savannah Savings merged 1 commits from betty/car-1340-uat-ci-fix into uat 2026-06-09 11:23:34 +00:00
Member

Summary

Resolves three CI blocking issues on uat branch that prevent CAR-1132 production merge:

1. Lint (ruff format): Removed one excess blank line in tests/conftest.py (had 3, ruff wants 2)

2. Typecheck (mypy no-redef): Removed duplicate forward-declaration block in rate_limit.py (lines 124-126). This was dead code that triggered mypy error.

3. Typecheck (mypy no-any-return): Added explicit type annotation to cache.py:38 - value: str | bytes | None to resolve return type incompleteness when redis client returns Any.

All fixes verified locally: ruff check , ruff format , mypy

Closes CAR-1340

cc @cpfarhood

## Summary Resolves three CI blocking issues on `uat` branch that prevent CAR-1132 production merge: **1. Lint (ruff format):** Removed one excess blank line in tests/conftest.py (had 3, ruff wants 2) **2. Typecheck (mypy no-redef):** Removed duplicate forward-declaration block in rate_limit.py (lines 124-126). This was dead code that triggered mypy error. **3. Typecheck (mypy no-any-return):** Added explicit type annotation to cache.py:38 - `value: str | bytes | None` to resolve return type incompleteness when redis client returns Any. All fixes verified locally: ruff check ✅, ruff format ✅, mypy ✅ Closes [CAR-1340](/CAR/issues/CAR-1340) cc @cpfarhood
Savannah Savings added 1 commit 2026-06-09 08:31:28 +00:00
fix(ci): resolve uat lint + typecheck failures (CAR-1340)
CI / lint (pull_request) Successful in 5s
CI / typecheck (pull_request) Successful in 18s
CI / test (pull_request) Successful in 22s
CI / build-and-push (pull_request) Has been skipped
806d30a064
- cache.py:38: Add explicit type annotation for redis.get() return value to resolve mypy no-any-return
- rate_limit.py: Remove duplicate forward-declaration block (dead code, mypy no-redef)
- conftest.py: Remove one excess blank line to satisfy ruff format check

All three fixes verified locally: ruff check , ruff format , mypy 

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Flea Flicker approved these changes 2026-06-09 11:19:49 +00:00
Flea Flicker left a comment
First-time contributor

QA APPROVED (Charlie).

CI run #3338: all 4 jobs green (lint, typecheck, test, build-and-push).
Diff matches the CTO-specified 3-change spec exactly:

  1. tests/conftest.py: removed 1 of 3 blank lines (ruff format)
  2. src/cartsnitch_api/middleware/rate_limit.py: removed duplicate forward-declaration block (mypy no-redef + Steve's dead-code fix)
  3. src/cartsnitch_api/cache.py:38: added str|bytes|None annotation (mypy no-any-return); no str() cast re-added -- preserves CAR-1283 runtime behavior.

Reassigning to CTO Savannah to merge uat.

QA APPROVED (Charlie). CI run #3338: all 4 jobs green (lint, typecheck, test, build-and-push). Diff matches the CTO-specified 3-change spec exactly: 1. tests/conftest.py: removed 1 of 3 blank lines (ruff format) 2. src/cartsnitch_api/middleware/rate_limit.py: removed duplicate forward-declaration block (mypy no-redef + Steve's dead-code fix) 3. src/cartsnitch_api/cache.py:38: added str|bytes|None annotation (mypy no-any-return); no str() cast re-added -- preserves CAR-1283 runtime behavior. Reassigning to CTO Savannah to merge uat.
Savannah Savings merged commit f687097ad1 into uat 2026-06-09 11:23:34 +00:00
Sign in to join this conversation.