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

Thu, 30 Nov 2023 11:59:40 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 30 Nov 2023 11:59:40 +0100
branch
eric7
changeset 10361
e6ff9a4f6ee5
parent 10046
35b27af462ef
child 10439
21c28b0f9e41
permissions
-rw-r--r--

Added checks for implicit string concatenation (based on flake8-implicit-str-concat 0.4.0) to the Miscellaneous checker.

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

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

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

from PyQt6.QtCore import QCoreApplication

_importsMessages = {
    "I101": QCoreApplication.translate(
        "ImportsChecker", "local import must be at the beginning of the method body"
    ),
    "I102": QCoreApplication.translate(
        "ImportsChecker",
        "packages from external modules should not be imported locally",
    ),
    "I103": QCoreApplication.translate(
        "ImportsChecker",
        "packages from standard modules should not be imported locally",
    ),
    "I901": QCoreApplication.translate(
        "ImportsChecker", "unnecessary import alias - rewrite as '{0}'"
    ),
    "I902": QCoreApplication.translate("ImportsChecker", "banned import '{0}' used"),
    "I903": QCoreApplication.translate(
        "ImportsChecker", "relative imports from parent modules are banned"
    ),
    "I904": QCoreApplication.translate("ImportsChecker", "relative imports are banned"),
}

_importsMessagesSampleArgs = {
    "I901": ["from foo import bar"],
    "I902": ["foo"],
}

eric ide

mercurial