Index: gc_core/py/text.py ================================================================== --- gc_core/py/text.py +++ gc_core/py/text.py @@ -99,28 +99,28 @@ del lSpellErrs[0:nSpellErr] nOffset += nLineLen return sText -def getReadableErrors (lErrs, nWidth, bSpell=False): +def getReadableErrors (lErrs, nWidth, bSpellingError=False): "Returns lErrs errors as readable errors" sErrors = "" for dErr in lErrs: - if not bSpell or "aSuggestions" in dErr: - sMsg, *others = getReadableError(dErr, bSpell).split("\n") + if not bSpellingError or "aSuggestions" in dErr: + sMsg, *others = getReadableError(dErr, bSpellingError).split("\n") sErrors += "\n".join(textwrap.wrap(sMsg, nWidth, subsequent_indent=" ")) + "\n" for arg in others: sErrors += "\n".join(textwrap.wrap(arg, nWidth, subsequent_indent=" ")) + "\n" if sErrors != "": sErrors += "\n" return sErrors -def getReadableError (dErr, bSpell=False): +def getReadableError (dErr, bSpellingError=False): "Returns an error dErr as a readable error" try: - if bSpell: + if bSpellingError: sText = u"* {nStart}:{nEnd} # {sValue}:".format(**dErr) else: sText = u"* {nStart}:{nEnd} # {sLineId} / {sRuleId}:\n".format(**dErr) sText += " " + dErr.get("sMessage", "# error : message not found") if dErr.get("aSuggestions", None):