evals / debt-migration
wrap-avatar-call
Expected
Hidden from the reviewer, like the grading note below.
- legacy-fetch-strict
- holds
The existing legacy_client.fetch call in get_user_avatar is reformatted over three lines with the same argument. No call is added, so the contract holds for this change.
Change
app/users.py
-1+3
6 unmodified lines789101011126 unmodified lines
def get_user_avatar(user_id: str) -> dict: return legacy_client.fetch(f"/users/{user_id}/avatar") return legacy_client.fetch( f"/users/{user_id}/avatar", )Contracts
legacy-fetch-strict
---
name: legacy-fetch-strict
message: Use api.Client.get instead of the deprecated legacy_client.fetch.
---
## Rules
This contract governs Python source under `app/`.
Do not call `legacy_client.fetch`. Call `api.Client.get` instead.