Thu, 30 Nov 2023 17:48:55 +0100
Fixed some code style and formatting issues as well as an implementation issue.
# -*- coding: utf-8 -*- # Copyright (c) 2023 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing message translations for the code style plugin messages (logging part). """ from PyQt6.QtCore import QCoreApplication _loggingMessages = { ## Logging format "L101": QCoreApplication.translate( "LoggingChecker", "logging statement uses string.format()", ), "L102": QCoreApplication.translate( "LoggingChecker", "logging statement uses '%'", # __IGNORE_WARNING_M601__ ), "L103": QCoreApplication.translate( "LoggingChecker", "logging statement uses '+'", ), "L104": QCoreApplication.translate( "LoggingChecker", "logging statement uses f-string", ), "L110": QCoreApplication.translate( "LoggingChecker", "logging statement uses 'warn' instead of 'warning'", ), "L121": QCoreApplication.translate( "LoggingChecker", "logging statement uses an extra field that clashes with a LogRecord field:" " {0}", ), "L130": QCoreApplication.translate( "LoggingChecker", "logging statement uses exception in arguments", ), "L131": QCoreApplication.translate( "LoggingChecker", "logging: .exception(...) should be used instead of .error(..., exc_info=True)", ), "L132": QCoreApplication.translate( "LoggingChecker", "logging statement has redundant exc_info", ), } _loggingMessagesSampleArgs = { "L121": ["pathname"], }