src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Complexity/translations.py

Mon, 24 Feb 2025 15:11:18 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 24 Feb 2025 15:11:18 +0100
branch
eric7
changeset 11147
dee6e106b4d3
parent 11090
f5f5f5803935
permissions
-rw-r--r--

Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).

# -*- coding: utf-8 -*-

# Copyright (c) 2020 - 2025 Detlev Offenbach <detlev@die-offenbachs.de>
#


"""
Module implementing message translations for the code style plugin messages
(code complexity part).
"""

from PyQt6.QtCore import QCoreApplication

_complexityMessages = {
    "C-101": QCoreApplication.translate(
        "ComplexityChecker", "'{0}' is too complex ({1})"
    ),
    "C-111": QCoreApplication.translate(
        "ComplexityChecker", "source code line is too complex ({0})"
    ),
    "C-112": QCoreApplication.translate(
        "ComplexityChecker", "overall source code line complexity is too high ({0})"
    ),
}

_complexityMessagesSampleArgs = {
    "C-101": ["foo.bar", "42"],
    "C-111": [42],
    "C-112": [12.0],
}

eric ide

mercurial