|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2025 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing message translations for the code style plugin messages |
|
8 (pydantic part). |
|
9 """ |
|
10 |
|
11 from PyQt6.QtCore import QCoreApplication |
|
12 |
|
13 _pydanticMessages = { |
|
14 ## pydantic |
|
15 "PYD001": QCoreApplication.translate( |
|
16 "PydanticChecker", |
|
17 "positional argument for Field default argument", |
|
18 ), |
|
19 "PYD002": QCoreApplication.translate( |
|
20 "PydanticChecker", |
|
21 "non-annotated attribute inside Pydantic model", |
|
22 ), |
|
23 "PYD003": QCoreApplication.translate( |
|
24 "PydanticChecker", |
|
25 "unecessary Field call to specify a default value", |
|
26 ), |
|
27 "PYD004": QCoreApplication.translate( |
|
28 "PydanticChecker", |
|
29 "default argument specified in annotated", |
|
30 ), |
|
31 "PYD005": QCoreApplication.translate( |
|
32 "PydanticChecker", |
|
33 "field name overrides annotation", |
|
34 ), |
|
35 "PYD006": QCoreApplication.translate( |
|
36 "PydanticChecker", |
|
37 "duplicate field name", |
|
38 ), |
|
39 "PYD010": QCoreApplication.translate( |
|
40 "PydanticChecker", |
|
41 "usage of __pydantic_config__; consider using the `with_config` decorator", |
|
42 ), |
|
43 } |