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

Sat, 01 Mar 2025 17:31:44 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 01 Mar 2025 17:31:44 +0100
branch
eric7
changeset 11159
2abfc48a72db
parent 11147
dee6e106b4d3
permissions
-rw-r--r--

Changed the code style checker to only instantiate and run those checkers, that are actually enabled.

# -*- 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