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

branch
eric7
changeset 11143
ef75c265ab47
child 11150
73d80859079c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Pydantic/translations.py	Sat Feb 22 18:04:02 2025 +0100
@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2025 Detlev Offenbach <detlev@die-offenbachs.de>
+#
+
+"""
+Module implementing message translations for the code style plugin messages
+(pydantic part).
+"""
+
+from PyQt6.QtCore import QCoreApplication
+
+_pydanticMessages = {
+    ## pydantic
+    "PYD001": QCoreApplication.translate(
+        "PydanticChecker",
+        "positional argument for Field default argument",
+    ),
+    "PYD002": QCoreApplication.translate(
+        "PydanticChecker",
+        "non-annotated attribute inside Pydantic model",
+    ),
+    "PYD003": QCoreApplication.translate(
+        "PydanticChecker",
+        "unecessary Field call to specify a default value",
+    ),
+    "PYD004": QCoreApplication.translate(
+        "PydanticChecker",
+        "default argument specified in annotated",
+    ),
+    "PYD005": QCoreApplication.translate(
+        "PydanticChecker",
+        "field name overrides annotation",
+    ),
+    "PYD006": QCoreApplication.translate(
+        "PydanticChecker",
+        "duplicate field name",
+    ),
+    "PYD010": QCoreApplication.translate(
+        "PydanticChecker",
+        "usage of __pydantic_config__; consider using the `with_config` decorator",
+    ),
+}

eric ide

mercurial