fix(translation): remove duplicate limiter import (closes #2898)#2900
fix(translation): remove duplicate limiter import (closes #2898)#2900codeboost-tr wants to merge 1 commit into
Conversation
|
Someone is attempting to deploy a commit to the ritesh Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hello! The Vercel deployment check is currently waiting for authorization from a team member. Could someone click through the authorization link so the build can run and deploy the preview? The changes are fully tested and linted, and ready for review. Thanks! |
Closes #2898
Summary
Removes the duplicate
limiterimport inbackend/routes/translation.py. The first import (from backend.services.rate_limit_config import limiter) was silently overridden by the second (from backend.limiter import limiter) on the very next line, so the canonicalbackend.limiterinstance is the one actually used at runtime — making therate_limit_configimport dead code.Changes
backend/routes/translation.py:15— Removedfrom backend.services.rate_limit_config import limiterand the two blank lines that followed itWhy this is safe
backend.limiter(line 19, now line 16 after removal) is the canonical, app-wide limiter instance used across the codebaserate_limit_config.limiteris silently shadowed on the next line, so removing it has zero runtime impactrate_limit_configinstance — verified by full-file readTesting
python -c "import ast; ast.parse(open('backend/routes/translation.py').read())"→ SYNTAX OKgit diffconfirms only the intended import is removed (3 lines deleted total: 1 import + 2 blank)Risk
Trivial. One-line removal, no behavior change, no test fixtures to update, no call site changes needed.