evals / debt-migration
user-via-legacy
Expected
Hidden from the reviewer, like the grading note below.
- legacy-fetch-strict
- violation
get_user switches from client.get to legacy_client.fetch, moving a migrated function back to the deprecated client.
Change
app/users.py
-1+1
2 unmodified lines345667892 unmodified lines
def get_user(client: Client, user_id: str) -> dict: return client.get(f"/users/{user_id}") return legacy_client.fetch(f"/users/{user_id}")
def get_user_avatar(user_id: str) -> dict: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.