fix(translate): M1-M3 medium + L1-L2 low bugs from QA review

M1: ReDoS guard — 500 char max + try/except on re.compile
M2: Performance note — O(n×m) regex documented for future optimization
M3: Verified test key names correct (metrics.py transforms cumulative_* → short)
L1: Removed @staticmethod no-op from module-level function
L2: Added aria-label to emoji indicators in CorrectionCell
This commit is contained in:
2026-05-14 17:44:50 +03:00
parent 1853d008e9
commit bb21fd3165
5 changed files with 26 additions and 8 deletions

View File

@@ -37,7 +37,6 @@ def _run_to_response(run: Any) -> dict:
# #region _dict_to_response [C:2] [TYPE Function]
# @BRIEF Convert a TerminologyDictionary ORM model to a response dict with computed entry_count.
@staticmethod
def _dict_to_response(d: Any, entry_count: int = 0) -> dict:
return {
"id": d.id,