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

Sat, 26 Apr 2025 12:34:32 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 26 Apr 2025 12:34:32 +0200
branch
eric7
changeset 11240
c48c615c04a3
parent 11148
15e30f0c76a8
permissions
-rw-r--r--

MicroPython
- Added a configuration option to disable the support for the no longer produced Pimoroni Pico Wireless Pack.

3413
5e63f809732a Code style checker: Translations extracted and refactored.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
5e63f809732a Code style checker: Translations extracted and refactored.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
2
11090
f5f5f5803935 Updated copyright for 2025.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10882
diff changeset
3 # Copyright (c) 2014 - 2025 Detlev Offenbach <detlev@die-offenbachs.de>
3413
5e63f809732a Code style checker: Translations extracted and refactored.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
4 #
5e63f809732a Code style checker: Translations extracted and refactored.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
5
5e63f809732a Code style checker: Translations extracted and refactored.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
6 """
5e63f809732a Code style checker: Translations extracted and refactored.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
7 Module implementing message translations for the code style plugin messages.
5e63f809732a Code style checker: Translations extracted and refactored.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
8 """
5e63f809732a Code style checker: Translations extracted and refactored.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
9
9473
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
10 import contextlib
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
11 import re
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
12
8318
962bce857696 Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8312
diff changeset
13 from PyQt6.QtCore import QCoreApplication
3413
5e63f809732a Code style checker: Translations extracted and refactored.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
14
7782
976d3b19ba7f Started refactoring the code style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7780
diff changeset
15 from .Annotations.translations import (
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
16 _annotationsMessages,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
17 _annotationsMessagesSampleArgs,
7782
976d3b19ba7f Started refactoring the code style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7780
diff changeset
18 )
10116
4a619fb7bd09 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10052
diff changeset
19 from .Async.translations import _asyncMessages, _asyncMessageSampleArgs
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
20 from .Complexity.translations import _complexityMessages, _complexityMessagesSampleArgs
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
21 from .DocStyle.translations import _docStyleMessages, _docStyleMessagesSampleArgs
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
22 from .Imports.translations import _importsMessages, _importsMessagesSampleArgs
10362
cfa7034cccf6 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10170
diff changeset
23 from .Logging.translations import _loggingMessages, _loggingMessagesSampleArgs
7784
3257703e10c5 Finished refactoring the code style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7782
diff changeset
24 from .Miscellaneous.translations import (
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
25 _miscellaneousMessages,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
26 _miscellaneousMessagesSampleArgs,
7784
3257703e10c5 Finished refactoring the code style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7782
diff changeset
27 )
10046
35b27af462ef Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
28 from .NameOrder.translations import _nameOrderMessages, _nameOrderMessagesSampleArgs
7784
3257703e10c5 Finished refactoring the code style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7782
diff changeset
29 from .Naming.translations import _namingStyleMessages
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
30 from .PathLib.translations import _pathlibMessages
11143
ef75c265ab47 Added a checker for `pydantic` and `dataclass` related topics based on `flake8-pydantic` v0.4.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
31 from .Pydantic.translations import _pydanticMessages
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
32 from .Security.translations import _securityMessages, _securityMessagesSampleArgs
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
33 from .Simplify.translations import _simplifyMessages, _simplifyMessagesSampleArgs
10052
041d0785dd42 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10046
diff changeset
34 from .Unused.translations import _unusedMessages, _unusedMessagesSampleArgs
3413
5e63f809732a Code style checker: Translations extracted and refactored.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
35
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
36 ##################################################################
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
37 ## pycodestyle error messages
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
38 ##################################################################
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
39
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
40 _pycodestyleErrorMessages = {
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
41 "E-101": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
42 "pycodestyle", "indentation contains mixed spaces and tabs"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
43 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
44 "E-111": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
45 "pycodestyle", "indentation is not a multiple of four"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
46 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
47 "E-112": QCoreApplication.translate("pycodestyle", "expected an indented block"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
48 "E-113": QCoreApplication.translate("pycodestyle", "unexpected indentation"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
49 "E-114": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
50 "pycodestyle", "indentation is not a multiple of four (comment)"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
51 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
52 "E-115": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
53 "pycodestyle", "expected an indented block (comment)"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
54 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
55 "E-116": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
56 "pycodestyle", "unexpected indentation (comment)"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
57 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
58 "E-117": QCoreApplication.translate("pycodestyle", "over-indented"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
59 "E-121": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
60 "pycodestyle", "continuation line indentation is not a multiple of four"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
61 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
62 "E-122": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
63 "pycodestyle", "continuation line missing indentation or outdented"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
64 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
65 "E-123": QCoreApplication.translate(
5147
d39dd5cee0c8 Renamed pep8.py to pycodestyle.py in order to track the upstream renaming.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5146
diff changeset
66 "pycodestyle",
9576
be9f8e7e42e0 Corrected some 'wrong' string quotes caused by the Black line merging.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9473
diff changeset
67 "closing bracket does not match indentation of opening bracket's line",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
68 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
69 "E-124": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
70 "pycodestyle", "closing bracket does not match visual indentation"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
71 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
72 "E-125": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
73 "pycodestyle", "continuation line with same indent as next logical line"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
74 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
75 "E-126": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
76 "pycodestyle", "continuation line over-indented for hanging indent"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
77 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
78 "E-127": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
79 "pycodestyle", "continuation line over-indented for visual indent"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
80 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
81 "E-128": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
82 "pycodestyle", "continuation line under-indented for visual indent"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
83 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
84 "E-129": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
85 "pycodestyle", "visually indented line with same indent as next logical line"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
86 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
87 "E-131": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
88 "pycodestyle", "continuation line unaligned for hanging indent"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
89 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
90 "E-133": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
91 "pycodestyle", "closing bracket is missing indentation"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
92 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
93 "E-201": QCoreApplication.translate("pycodestyle", "whitespace after '{0}'"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
94 "E-202": QCoreApplication.translate("pycodestyle", "whitespace before '{0}'"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
95 "E-203": QCoreApplication.translate("pycodestyle", "whitespace before '{0}'"),
11148
15e30f0c76a8 Adjusted the code to the modified issue codes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11147
diff changeset
96 "E-204": QCoreApplication.translate(
15e30f0c76a8 Adjusted the code to the modified issue codes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11147
diff changeset
97 "pycodestyle", "whitespace after decorator '@'"
15e30f0c76a8 Adjusted the code to the modified issue codes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11147
diff changeset
98 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
99 "E-211": QCoreApplication.translate("pycodestyle", "whitespace before '{0}'"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
100 "E-221": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
101 "pycodestyle", "multiple spaces before operator"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
102 ),
11148
15e30f0c76a8 Adjusted the code to the modified issue codes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11147
diff changeset
103 "E-222": QCoreApplication.translate(
15e30f0c76a8 Adjusted the code to the modified issue codes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11147
diff changeset
104 "pycodestyle", "multiple spaces after operator"
15e30f0c76a8 Adjusted the code to the modified issue codes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11147
diff changeset
105 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
106 "E-223": QCoreApplication.translate("pycodestyle", "tab before operator"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
107 "E-224": QCoreApplication.translate("pycodestyle", "tab after operator"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
108 "E-225": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
109 "pycodestyle", "missing whitespace around operator"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
110 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
111 "E-226": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
112 "pycodestyle", "missing whitespace around arithmetic operator"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
113 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
114 "E-227": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
115 "pycodestyle", "missing whitespace around bitwise or shift operator"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
116 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
117 "E-228": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
118 "pycodestyle", "missing whitespace around modulo operator"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
119 ),
11148
15e30f0c76a8 Adjusted the code to the modified issue codes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11147
diff changeset
120 "E-231": QCoreApplication.translate(
15e30f0c76a8 Adjusted the code to the modified issue codes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11147
diff changeset
121 "pycodestyle", "missing whitespace after '{0}'"
15e30f0c76a8 Adjusted the code to the modified issue codes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11147
diff changeset
122 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
123 "E-241": QCoreApplication.translate("pycodestyle", "multiple spaces after '{0}'"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
124 "E-242": QCoreApplication.translate("pycodestyle", "tab after '{0}'"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
125 "E-251": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
126 "pycodestyle", "unexpected spaces around keyword / parameter equals"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
127 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
128 "E-252": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
129 "pycodestyle", "missing whitespace around parameter equals"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
130 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
131 "E-261": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
132 "pycodestyle", "at least two spaces before inline comment"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
133 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
134 "E-262": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
135 "pycodestyle", "inline comment should start with '# '"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
136 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
137 "E-265": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
138 "pycodestyle", "block comment should start with '# '"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
139 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
140 "E-266": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
141 "pycodestyle", "too many leading '#' for block comment"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
142 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
143 "E-271": QCoreApplication.translate("pycodestyle", "multiple spaces after keyword"),
11148
15e30f0c76a8 Adjusted the code to the modified issue codes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11147
diff changeset
144 "E-272": QCoreApplication.translate(
15e30f0c76a8 Adjusted the code to the modified issue codes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11147
diff changeset
145 "pycodestyle", "multiple spaces before keyword"
15e30f0c76a8 Adjusted the code to the modified issue codes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11147
diff changeset
146 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
147 "E-273": QCoreApplication.translate("pycodestyle", "tab after keyword"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
148 "E-274": QCoreApplication.translate("pycodestyle", "tab before keyword"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
149 "E-275": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
150 "pycodestyle", "missing whitespace after keyword"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
151 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
152 "E-301": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
153 "pycodestyle", "expected {0} blank lines, found {1}"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
154 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
155 "E-302": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
156 "pycodestyle", "expected {0} blank lines, found {1}"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
157 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
158 "E-303": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
159 "pycodestyle", "too many blank lines ({0}), expected {1}"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
160 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
161 "E-304": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
162 "pycodestyle", "blank lines found after function decorator"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
163 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
164 "E-305": QCoreApplication.translate(
5147
d39dd5cee0c8 Renamed pep8.py to pycodestyle.py in order to track the upstream renaming.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5146
diff changeset
165 "pycodestyle",
9576
be9f8e7e42e0 Corrected some 'wrong' string quotes caused by the Black line merging.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9473
diff changeset
166 "expected {0} blank lines after class or function definition, found {1}",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
167 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
168 "E-306": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
169 "pycodestyle", "expected {0} blank lines before a nested definition, found {1}"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
170 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
171 "E-307": QCoreApplication.translate(
6264
04a671fa4adb code style checker: extended the dialog to be able to define the number of blank lines before class and function/method definitions
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6246
diff changeset
172 "pycodestyle",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
173 "too many blank lines ({0}) before a nested definition, expected {1}",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
174 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
175 "E-308": QCoreApplication.translate("pycodestyle", "too many blank lines ({0})"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
176 "E-401": QCoreApplication.translate("pycodestyle", "multiple imports on one line"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
177 "E-402": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
178 "pycodestyle", "module level import not at top of file"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
179 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
180 "E-501": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
181 "pycodestyle", "line too long ({0} > {1} characters)"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
182 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
183 "E-502": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
184 "pycodestyle", "the backslash is redundant between brackets"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
185 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
186 "E-701": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
187 "pycodestyle", "multiple statements on one line (colon)"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
188 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
189 "E-702": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
190 "pycodestyle", "multiple statements on one line (semicolon)"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
191 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
192 "E-703": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
193 "pycodestyle", "statement ends with a semicolon"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
194 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
195 "E-704": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
196 "pycodestyle", "multiple statements on one line (def)"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
197 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
198 "E-711": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
199 "pycodestyle", "comparison to {0} should be {1}"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
200 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
201 "E-712": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
202 "pycodestyle", "comparison to {0} should be {1}"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
203 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
204 "E-713": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
205 "pycodestyle", "test for membership should be 'not in'"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
206 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
207 "E-714": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
208 "pycodestyle", "test for object identity should be 'is not'"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
209 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
210 "E-721": QCoreApplication.translate(
10168
8312e0e76795 Third Party packages
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10116
diff changeset
211 "pycodestyle",
8312e0e76795 Third Party packages
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10116
diff changeset
212 "do not compare types, for exact checks use 'is' / 'is not', "
10170
6cf1ee737d8f Corrected some more code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10168
diff changeset
213 "for instance checks use 'isinstance()'",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
214 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
215 "E-722": QCoreApplication.translate("pycodestyle", "do not use bare except"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
216 "E-731": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
217 "pycodestyle", "do not assign a lambda expression, use a def"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
218 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
219 "E-741": QCoreApplication.translate("pycodestyle", "ambiguous variable name '{0}'"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
220 "E-742": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
221 "pycodestyle", "ambiguous class definition '{0}'"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
222 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
223 "E-743": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
224 "pycodestyle", "ambiguous function definition '{0}'"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
225 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
226 "E-901": QCoreApplication.translate("pycodestyle", "{0}: {1}"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
227 "E-902": QCoreApplication.translate("pycodestyle", "{0}"),
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
228 }
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
229
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
230 ##################################################################
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
231 ## pycodestyle warning messages
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
232 ##################################################################
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
233
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
234 _pycodestyleWarningMessages = {
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
235 "W-191": QCoreApplication.translate("pycodestyle", "indentation contains tabs"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
236 "W-291": QCoreApplication.translate("pycodestyle", "trailing whitespace"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
237 "W-292": QCoreApplication.translate("pycodestyle", "no newline at end of file"),
11148
15e30f0c76a8 Adjusted the code to the modified issue codes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11147
diff changeset
238 "W-293": QCoreApplication.translate(
15e30f0c76a8 Adjusted the code to the modified issue codes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11147
diff changeset
239 "pycodestyle", "blank line contains whitespace"
15e30f0c76a8 Adjusted the code to the modified issue codes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11147
diff changeset
240 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
241 "W-391": QCoreApplication.translate("pycodestyle", "blank line at end of file"),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
242 "W-503": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
243 "pycodestyle", "line break before binary operator"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
244 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
245 "W-504": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
246 "pycodestyle", "line break after binary operator"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
247 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
248 "W-505": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
249 "pycodestyle", "doc line too long ({0} > {1} characters)"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
250 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
251 "W-605": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
252 "pycodestyle", "invalid escape sequence '\\{0}'"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
253 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
254 "W-606": QCoreApplication.translate(
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
255 "pycodestyle",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
256 "'async' and 'await' are reserved keywords starting with Python 3.7",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
257 ),
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
258 }
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
259
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
260 ##################################################################
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
261 ## CodeStyleFixer messages
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
262 ##################################################################
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
263
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
264 _fixMessages = {
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
265 "FIX-D111": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
266 "CodeStyleFixer", "Triple single quotes converted to triple double quotes."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
267 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
268 "FIX-D112": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
269 "CodeStyleFixer", 'Introductory quotes corrected to be {0}"""'
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
270 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
271 "FIX-D121": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
272 "CodeStyleFixer", "Single line docstring put on one line."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
273 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
274 "FIX-D131": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
275 "CodeStyleFixer", "Period added to summary line."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
276 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
277 "FIX-D141": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
278 "CodeStyleFixer", "Blank line before function/method docstring removed."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
279 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
280 "FIX-D142": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
281 "CodeStyleFixer", "Blank line inserted before class docstring."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
282 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
283 "FIX-D143": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
284 "CodeStyleFixer", "Blank line inserted after class docstring."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
285 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
286 "FIX-D144": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
287 "CodeStyleFixer", "Blank line inserted after docstring summary."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
288 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
289 "FIX-D145": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
290 "CodeStyleFixer", "Blank line inserted after last paragraph of docstring."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
291 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
292 "FIX-D221": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
293 "CodeStyleFixer", "Leading quotes put on separate line."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
294 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
295 "FIX-D222": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
296 "CodeStyleFixer", "Trailing quotes put on separate line."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
297 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
298 "FIX-D242": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
299 "CodeStyleFixer", "Blank line before class docstring removed."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
300 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
301 "FIX-D244": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
302 "CodeStyleFixer", "Blank line before function/method docstring removed."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
303 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
304 "FIX-D243": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
305 "CodeStyleFixer", "Blank line after class docstring removed."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
306 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
307 "FIX-D245": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
308 "CodeStyleFixer", "Blank line after function/method docstring removed."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
309 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
310 "FIX-D247": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
311 "CodeStyleFixer", "Blank line after last paragraph removed."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
312 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
313 "FIX-E101": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
314 "CodeStyleFixer", "Tab converted to 4 spaces."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
315 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
316 "FIX-E111": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
317 "CodeStyleFixer", "Indentation adjusted to be a multiple of four."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
318 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
319 "FIX-E121": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
320 "CodeStyleFixer", "Indentation of continuation line corrected."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
321 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
322 "FIX-E124": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
323 "CodeStyleFixer", "Indentation of closing bracket corrected."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
324 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
325 "FIX-E122": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
326 "CodeStyleFixer", "Missing indentation of continuation line corrected."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
327 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
328 "FIX-E123": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
329 "CodeStyleFixer", "Closing bracket aligned to opening bracket."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
330 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
331 "FIX-E125": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
332 "CodeStyleFixer", "Indentation level changed."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
333 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
334 "FIX-E126": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
335 "CodeStyleFixer", "Indentation level of hanging indentation changed."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
336 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
337 "FIX-E127": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
338 "CodeStyleFixer", "Visual indentation corrected."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
339 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
340 "FIX-E201": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
341 "CodeStyleFixer", "Extraneous whitespace removed."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
342 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
343 "FIX-E225": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
344 "CodeStyleFixer", "Missing whitespace added."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
345 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
346 "FIX-E221": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
347 "CodeStyleFixer", "Extraneous whitespace removed."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
348 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
349 "FIX-E231": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
350 "CodeStyleFixer", "Missing whitespace added."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
351 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
352 "FIX-E251": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
353 "CodeStyleFixer", "Extraneous whitespace removed."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
354 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
355 "FIX-E261": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
356 "CodeStyleFixer", "Whitespace around comment sign corrected."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
357 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
358 "FIX-E302+": lambda n=1: QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
359 "CodeStyleFixer", "%n blank line(s) inserted.", "", n
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
360 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
361 "FIX-E302-": lambda n=1: QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
362 "CodeStyleFixer", "%n superfluous lines removed", "", n
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
363 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
364 "FIX-E303": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
365 "CodeStyleFixer", "Superfluous blank lines removed."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
366 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
367 "FIX-E304": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
368 "CodeStyleFixer", "Superfluous blank lines after function decorator removed."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
369 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
370 "FIX-E401": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
371 "CodeStyleFixer", "Imports were put on separate lines."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
372 ),
11148
15e30f0c76a8 Adjusted the code to the modified issue codes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11147
diff changeset
373 "FIX-E-501": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
374 "CodeStyleFixer", "Long lines have been shortened."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
375 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
376 "FIX-E502": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
377 "CodeStyleFixer", "Redundant backslash in brackets removed."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
378 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
379 "FIX-E701": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
380 "CodeStyleFixer", "Compound statement corrected."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
381 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
382 "FIX-E702": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
383 "CodeStyleFixer", "Compound statement corrected."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
384 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
385 "FIX-E711": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
386 "CodeStyleFixer", "Comparison to None/True/False corrected."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
387 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
388 "FIX-N804": QCoreApplication.translate("CodeStyleFixer", "'{0}' argument added."),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
389 "FIX-N806": QCoreApplication.translate("CodeStyleFixer", "'{0}' argument removed."),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
390 "FIX-W291": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
391 "CodeStyleFixer", "Whitespace stripped from end of line."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
392 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
393 "FIX-W292": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
394 "CodeStyleFixer", "newline added to end of file."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
395 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
396 "FIX-W391": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
397 "CodeStyleFixer", "Superfluous trailing blank lines removed from end of file."
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
398 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
399 "FIX-W603": QCoreApplication.translate("CodeStyleFixer", "'<>' replaced by '!='."),
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
400 "FIX-WRITE_ERROR": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
401 "CodeStyleFixer", "Could not save the file! Skipping it. Reason: {0}"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
402 ),
3413
5e63f809732a Code style checker: Translations extracted and refactored.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
403 }
5e63f809732a Code style checker: Translations extracted and refactored.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
404
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
405 _pycodestyleErrorMessagesSampleArgs = {
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
406 "E-201": ["([{"],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
407 "E-202": ["}])"],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
408 "E-203": [",;:"],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
409 "E-211": ["(["],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
410 "E-231": [",;:"],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
411 "E-241": [",;:"],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
412 "E-242": [",;:"],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
413 "E-301": [1, 0],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
414 "E-302": [2, 1],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
415 "E-303": [3, 2],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
416 "E-305": [2, 1],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
417 "E-306": [1, 0],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
418 "E-307": [3, 1],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
419 "E-308": [3],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
420 "E-501": [95, 88],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
421 "E-711": ["None", "'if cond is None:'"],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
422 "E-712": ["True", "'if cond is True:' or 'if cond:'"],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
423 "E-741": ["l"],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
424 "E-742": ["l"],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
425 "E-743": ["l"],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
426 "E-901": ["SyntaxError", "Invalid Syntax"],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
427 "E-902": ["OSError"],
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
428 }
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
429
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
430 _pycodestyleWarningMessagesSampleArgs = {
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
431 "W-505": [80, 72],
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
432 "W-605": ["A"],
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
433 }
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
434
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
435 _fixMessagesSampleArgs = {
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11143
diff changeset
436 "FIX-WRITE_ERROR": ["OSError"],
3443
7d919fd299f6 Bugfix for statistics dialog of the code style checker.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3413
diff changeset
437 }
7d919fd299f6 Bugfix for statistics dialog of the code style checker.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3413
diff changeset
438
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
439 messageCatalogs = {
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
440 "A": _annotationsMessages,
10116
4a619fb7bd09 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10052
diff changeset
441 "ASY": _asyncMessages,
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
442 "C": _complexityMessages,
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
443 "D": _docStyleMessages,
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
444 "E": _pycodestyleErrorMessages,
8790
548df4df8256 Continued implementing a checker for import statements.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
445 "I": _importsMessages,
10362
cfa7034cccf6 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10170
diff changeset
446 "L": _loggingMessages,
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
447 "M": _miscellaneousMessages,
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
448 "N": _namingStyleMessages,
10046
35b27af462ef Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
449 "NO": _nameOrderMessages,
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
450 "P": _pathlibMessages,
11143
ef75c265ab47 Added a checker for `pydantic` and `dataclass` related topics based on `flake8-pydantic` v0.4.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
451 "PYD": _pydanticMessages,
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
452 "S": _securityMessages,
10052
041d0785dd42 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10046
diff changeset
453 "U": _unusedMessages,
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
454 "W": _pycodestyleWarningMessages,
8186
655b658aa7ee Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8169
diff changeset
455 "Y": _simplifyMessages,
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
456 "FIX": _fixMessages,
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
457 }
3413
5e63f809732a Code style checker: Translations extracted and refactored.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
458
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
459 messageSampleArgsCatalog = {
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
460 "A": _annotationsMessagesSampleArgs,
10116
4a619fb7bd09 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10052
diff changeset
461 "ASY": _asyncMessageSampleArgs,
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
462 "C": _complexityMessagesSampleArgs,
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
463 "D": _docStyleMessagesSampleArgs,
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
464 "E": _pycodestyleErrorMessagesSampleArgs,
8790
548df4df8256 Continued implementing a checker for import statements.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
465 "I": _importsMessagesSampleArgs,
10362
cfa7034cccf6 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10170
diff changeset
466 "L": _loggingMessagesSampleArgs,
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
467 "M": _miscellaneousMessagesSampleArgs,
10046
35b27af462ef Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
468 "NO": _nameOrderMessagesSampleArgs,
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
469 "S": _securityMessagesSampleArgs,
10052
041d0785dd42 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10046
diff changeset
470 "U": _unusedMessagesSampleArgs,
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
471 "W": _pycodestyleWarningMessagesSampleArgs,
8186
655b658aa7ee Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8169
diff changeset
472 "Y": _simplifyMessagesSampleArgs,
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
473 "FIX": _fixMessagesSampleArgs,
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
474 }
7613
382f89c11e27 Code Style Checker: continued to implement checker for security related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7611
diff changeset
475
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
476 messageCategoryRe = re.compile(r"([A-Z]{1,3}).+")
10116
4a619fb7bd09 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10052
diff changeset
477 # message category is max. 3 characters
7613
382f89c11e27 Code Style Checker: continued to implement checker for security related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7611
diff changeset
478
8169
139bd30c52c2 Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8168
diff changeset
479
7613
382f89c11e27 Code Style Checker: continued to implement checker for security related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7611
diff changeset
480 def getTranslatedMessage(messageCode, messageArgs, example=False):
3413
5e63f809732a Code style checker: Translations extracted and refactored.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
481 """
5e63f809732a Code style checker: Translations extracted and refactored.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
482 Module function to get a translated and formatted message for a
7609
d5aff4fd0ef8 Code Style Checker: changed the dialog to allow the selection of checker categories.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
483 given message ID.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
484
7610
df7025fe26a3 Code Style Checker: reworked the API between frontend and backend to get some more flexibility for the future.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7609
diff changeset
485 @param messageCode the message code
7609
d5aff4fd0ef8 Code Style Checker: changed the dialog to allow the selection of checker categories.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
486 @type str
7610
df7025fe26a3 Code Style Checker: reworked the API between frontend and backend to get some more flexibility for the future.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7609
diff changeset
487 @param messageArgs list of arguments or a single integer value to format
df7025fe26a3 Code Style Checker: reworked the API between frontend and backend to get some more flexibility for the future.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7609
diff changeset
488 the message
df7025fe26a3 Code Style Checker: reworked the API between frontend and backend to get some more flexibility for the future.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7609
diff changeset
489 @type list or int
7613
382f89c11e27 Code Style Checker: continued to implement checker for security related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7611
diff changeset
490 @param example flag indicating a translated message filled with example
382f89c11e27 Code Style Checker: continued to implement checker for security related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7611
diff changeset
491 data is requested (messageArgs is ignored if given)
382f89c11e27 Code Style Checker: continued to implement checker for security related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7611
diff changeset
492 @type bool
7609
d5aff4fd0ef8 Code Style Checker: changed the dialog to allow the selection of checker categories.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
493 @return translated and formatted message
d5aff4fd0ef8 Code Style Checker: changed the dialog to allow the selection of checker categories.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
494 @rtype str
3413
5e63f809732a Code style checker: Translations extracted and refactored.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
495 """
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
496 match = messageCategoryRe.match(messageCode)
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
497 if match:
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
498 # the message code is OK
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
499 messageCategory = match.group(1)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
500
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
501 if example:
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
502 try:
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
503 argsCatalog = messageSampleArgsCatalog[messageCategory]
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
504 try:
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
505 args = argsCatalog[messageCode]
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
506 except KeyError:
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
507 args = None
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
508 except KeyError:
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
509 args = None
7613
382f89c11e27 Code Style Checker: continued to implement checker for security related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7611
diff changeset
510 else:
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
511 args = messageArgs
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
512
8243
cc717c2ae956 Applied some more code simplifications suggested by the new Simplify checker (Y105: use contextlib.suppress) (batch 2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8223
diff changeset
513 with contextlib.suppress(KeyError):
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
514 catalog = messageCatalogs[messageCategory]
8243
cc717c2ae956 Applied some more code simplifications suggested by the new Simplify checker (Y105: use contextlib.suppress) (batch 2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8223
diff changeset
515 with contextlib.suppress(KeyError):
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
516 message = catalog[messageCode]
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
517 if args is None:
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
518 return message
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
519 elif isinstance(args, int):
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
520 # Retranslate with correct plural form
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
521 return message(args)
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
522 else:
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
523 return message.format(*args)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
524
8169
139bd30c52c2 Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8168
diff changeset
525 if example:
139bd30c52c2 Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8168
diff changeset
526 return None
139bd30c52c2 Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8168
diff changeset
527 else:
139bd30c52c2 Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8168
diff changeset
528 return QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
529 "CodeStyleChecker", "No message defined for code '{0}'."
8169
139bd30c52c2 Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8168
diff changeset
530 ).format(messageCode)
7613
382f89c11e27 Code Style Checker: continued to implement checker for security related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7611
diff changeset
531
382f89c11e27 Code Style Checker: continued to implement checker for security related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7611
diff changeset
532
382f89c11e27 Code Style Checker: continued to implement checker for security related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7611
diff changeset
533 def getMessageCodes():
382f89c11e27 Code Style Checker: continued to implement checker for security related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7611
diff changeset
534 """
382f89c11e27 Code Style Checker: continued to implement checker for security related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7611
diff changeset
535 Module function to get a list of known message codes.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
536
7613
382f89c11e27 Code Style Checker: continued to implement checker for security related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7611
diff changeset
537 @return list of known message codes
382f89c11e27 Code Style Checker: continued to implement checker for security related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7611
diff changeset
538 @rtype set of str
382f89c11e27 Code Style Checker: continued to implement checker for security related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7611
diff changeset
539 """
382f89c11e27 Code Style Checker: continued to implement checker for security related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7611
diff changeset
540 knownCodes = []
8168
bdb0258faf42 Code Style Checker: reorganized the code a little bit.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
541 for catalog in messageCatalogs.values():
10373
093dcebe5ecb Corrected some uses of dict.keys(), dict.values() and dict.items().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10362
diff changeset
542 knownCodes += list(catalog)
7613
382f89c11e27 Code Style Checker: continued to implement checker for security related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7611
diff changeset
543 return {c.split(".", 1)[0] for c in knownCodes}
6246
fe07a9f16f23 Updated pycodestyle to 2.4.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6184
diff changeset
544
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
545
6246
fe07a9f16f23 Updated pycodestyle to 2.4.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6184
diff changeset
546 #
fe07a9f16f23 Updated pycodestyle to 2.4.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6184
diff changeset
547 # eflag: noqa = M201

eric ide

mercurial