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

Mon, 24 Feb 2025 15:11:18 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 24 Feb 2025 15:11:18 +0100
branch
eric7
changeset 11147
dee6e106b4d3
parent 11145
d328a7b74fd8
permissions
-rw-r--r--

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).

8186
655b658aa7ee Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
655b658aa7ee Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
11090
f5f5f5803935 Updated copyright for 2025.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10439
diff changeset
3 # Copyright (c) 2020 - 2025 Detlev Offenbach <detlev@die-offenbachs.de>
8186
655b658aa7ee Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
655b658aa7ee Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
655b658aa7ee Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6
655b658aa7ee Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 """
655b658aa7ee Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 Module implementing message translations for the code style plugin messages
8189
17df5c8df8c1 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8186
diff changeset
9 (simplify part).
8186
655b658aa7ee Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 """
655b658aa7ee Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
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
12 from PyQt6.QtCore import QCoreApplication
8186
655b658aa7ee Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13
655b658aa7ee Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 _simplifyMessages = {
8195
db7f2badd374 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8194
diff changeset
15 # Python-specifics
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: 11145
diff changeset
16 "Y-101": QCoreApplication.translate(
8186
655b658aa7ee Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 "SimplifyChecker",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
18 """Multiple "isinstance()" calls which can be merged into a single """
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
19 '''call for variable "{0}"''',
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
20 ),
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: 11145
diff changeset
21 "Y-102": QCoreApplication.translate(
8189
17df5c8df8c1 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8186
diff changeset
22 "SimplifyChecker",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
23 """Use a single if-statement instead of nested if-statements""",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
24 ),
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: 11145
diff changeset
25 "Y-103": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
26 "SimplifyChecker", """Return the condition "{0}" directly"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
27 ),
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: 11145
diff changeset
28 "Y-104": QCoreApplication.translate("SimplifyChecker", '''Use "yield from {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: 11145
diff changeset
29 "Y-105": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
30 "SimplifyChecker", '''Use "with contextlib.suppress({0}):"'''
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
31 ),
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: 11145
diff changeset
32 "Y-106": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
33 "SimplifyChecker", """Handle error-cases first"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
34 ),
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: 11145
diff changeset
35 "Y-107": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
36 "SimplifyChecker", """Don't use return in try/except and finally"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
37 ),
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: 11145
diff changeset
38 "Y-108": QCoreApplication.translate(
8192
e1157bd8b4c2 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8191
diff changeset
39 "SimplifyChecker",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
40 """Use ternary operator "{0} = {1} if {2} else {3}" """
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
41 """instead of if-else-block""",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
42 ),
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: 11145
diff changeset
43 "Y-109": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
44 "SimplifyChecker", '''Use "{0} in {1}" instead of "{2}"'''
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
45 ),
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: 11145
diff changeset
46 "Y-110": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
47 "SimplifyChecker", '''Use "any({0} for {1} in {2})"'''
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
48 ),
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: 11145
diff changeset
49 "Y-111": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
50 "SimplifyChecker", '''Use "all({0} for {1} in {2})"'''
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: 11145
diff changeset
52 "Y-112": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
53 "SimplifyChecker", '''Use "{0}" instead of "{1}"'''
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: 11145
diff changeset
55 "Y-113": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
56 "SimplifyChecker", '''Use enumerate instead of "{0}"'''
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: 11145
diff changeset
58 "Y-114": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
59 "SimplifyChecker", """Use logical or ("({0}) or ({1})") and a single body"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
60 ),
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: 11145
diff changeset
61 "Y-115": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
62 "SimplifyChecker", """Use context handler for opening files"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
63 ),
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: 11145
diff changeset
64 "Y-116": QCoreApplication.translate(
8191
9125da0c227e Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8189
diff changeset
65 "SimplifyChecker",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
66 """Use a dictionary lookup instead of 3+ if/elif-statements: """
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
67 """return {0}""",
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: 11145
diff changeset
69 "Y-117": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
70 "SimplifyChecker", """Use "{0}" instead of multiple with statements"""
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: 11145
diff changeset
72 "Y-118": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
73 "SimplifyChecker", '''Use "{0} in {1}" instead of "{0} in {1}.keys()"'''
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: 11145
diff changeset
75 "Y-119": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
76 "SimplifyChecker", '''Use a dataclass for "class {0}"'''
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: 11145
diff changeset
78 "Y-120": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
79 "SimplifyChecker", '''Use "class {0}:" instead of "class {0}(object):"'''
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: 11145
diff changeset
81 "Y-121": QCoreApplication.translate(
8210
b5903eaa7a7b Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8209
diff changeset
82 "SimplifyChecker",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
83 '''Use "class {0}({1}):" instead of "class {0}({1}, object):"''',
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
84 ),
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: 11145
diff changeset
85 "Y-122": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
86 "SimplifyChecker", '''Use "{0}.get({1})" instead of "if {1} in {0}: {0}[{1}]"'''
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
87 ),
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: 11145
diff changeset
88 "Y-123": QCoreApplication.translate(
9278
36448ca469c2 Simplified some code iaw. recommendations of the extended style checker and reformatted the code with black.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9277
diff changeset
89 "SimplifyChecker", """Use "{0} = {1}.get({2}, {3})" instead of an if-block"""
9277
471c5a263d53 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
90 ),
8209
14470a65a52e Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8203
diff changeset
91 # Python-specifics not part of flake8-simplify
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: 11145
diff changeset
92 "Y-181": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
93 "SimplifyChecker", '''Use "{0}" instead of "{1}"'''
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
94 ),
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: 11145
diff changeset
95 "Y-182": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
96 "SimplifyChecker", '''Use "super()" instead of "{0}"'''
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
97 ),
8195
db7f2badd374 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8194
diff changeset
98 # Comparations
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: 11145
diff changeset
99 "Y-201": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
100 "SimplifyChecker", '''Use "{0} != {1}" instead of "not {0} == {1}"'''
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
101 ),
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: 11145
diff changeset
102 "Y-202": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
103 "SimplifyChecker", '''Use "{0} == {1}" instead of "not {0} != {1}"'''
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
104 ),
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: 11145
diff changeset
105 "Y-203": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
106 "SimplifyChecker", '''Use "{0} not in {1}" instead of "not {0} in {1}"'''
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
107 ),
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: 11145
diff changeset
108 "Y-204": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
109 "SimplifyChecker", '''Use "{0} >= {1}" instead of "not ({0} < {1})"'''
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: 11145
diff changeset
111 "Y-205": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
112 "SimplifyChecker", '''Use "{0} > {1}" instead of "not ({0} <= {1})"'''
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: 11145
diff changeset
114 "Y-206": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
115 "SimplifyChecker", '''Use "{0} <= {1}" instead of "not ({0} > {1})"'''
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: 11145
diff changeset
117 "Y-207": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
118 "SimplifyChecker", '''Use "{0} < {1}" instead of "not ({0} >= {1})"'''
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
119 ),
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: 11145
diff changeset
120 "Y-208": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
121 "SimplifyChecker", '''Use "{0}" instead of "not (not {0})"'''
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
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: 11145
diff changeset
123 "Y-211": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
124 "SimplifyChecker", '''Use "{1}" instead of "True if {0} else False"'''
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
125 ),
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: 11145
diff changeset
126 "Y-212": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
127 "SimplifyChecker", '''Use "{1}" instead of "False if {0} else True"'''
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
128 ),
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: 11145
diff changeset
129 "Y-213": QCoreApplication.translate(
8195
db7f2badd374 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8194
diff changeset
130 "SimplifyChecker",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
131 '''Use "{0} if {0} else {1}" instead of "{1} if not {0} else {0}"''',
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
132 ),
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: 11145
diff changeset
133 "Y-221": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
134 "SimplifyChecker", '''Use "False" instead of "{0} and not {0}"'''
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
135 ),
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: 11145
diff changeset
136 "Y-222": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
137 "SimplifyChecker", '''Use "True" instead of "{0} or not {0}"'''
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
138 ),
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: 11145
diff changeset
139 "Y-223": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
140 "SimplifyChecker", '''Use "True" instead of "... or True"'''
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
141 ),
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: 11145
diff changeset
142 "Y-224": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
143 "SimplifyChecker", '''Use "False" instead of "... and False"'''
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
144 ),
8211
8322a6f219ff Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8210
diff changeset
145 # Opinionated
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: 11145
diff changeset
146 "Y-301": QCoreApplication.translate(
8195
db7f2badd374 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8194
diff changeset
147 "SimplifyChecker",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
148 """Use "{1} == {0}" instead of "{0} == {1}" (Yoda-condition)""",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
149 ),
8211
8322a6f219ff Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8210
diff changeset
150 # General Code Style
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: 11145
diff changeset
151 "Y-401": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
152 "SimplifyChecker", """Use keyword-argument instead of magic boolean"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
153 ),
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: 11145
diff changeset
154 "Y-402": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
155 "SimplifyChecker", """Use keyword-argument instead of magic number"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
156 ),
11141
2f5f73c51c7c Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
157 # f-Strings
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: 11145
diff changeset
158 "Y-411": QCoreApplication.translate("SimplifyChecker", "Do not nest f-strings"),
11141
2f5f73c51c7c Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
159 # Additional Checks
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: 11145
diff changeset
160 "Y-901": QCoreApplication.translate(
9277
471c5a263d53 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
161 "SimplifyChecker", '''Use "{0}" instead of "{1}"'''
471c5a263d53 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
162 ),
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: 11145
diff changeset
163 "Y-904": QCoreApplication.translate(
9277
471c5a263d53 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
164 "SimplifyChecker", """Initialize dictionary "{0}" directly"""
471c5a263d53 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
165 ),
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: 11145
diff changeset
166 "Y-905": QCoreApplication.translate(
9277
471c5a263d53 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
167 "SimplifyChecker", '''Use "{0}" instead of "{1}"'''
471c5a263d53 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
168 ),
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: 11145
diff changeset
169 "Y-906": QCoreApplication.translate(
9277
471c5a263d53 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
170 "SimplifyChecker", '''Use "{0}" instead of "{1}"'''
471c5a263d53 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
171 ),
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: 11145
diff changeset
172 "Y-907": QCoreApplication.translate(
9277
471c5a263d53 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
173 "SimplifyChecker", '''Use "Optional[{0}]" instead of "{1}"'''
471c5a263d53 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
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: 11145
diff changeset
175 "Y-909": QCoreApplication.translate(
9277
471c5a263d53 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
176 "SimplifyChecker", '''Remove reflexive assignment "{0}"'''
471c5a263d53 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
177 ),
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: 11145
diff changeset
178 "Y-910": QCoreApplication.translate(
10047
cc9ead6d1c46 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
179 "SimplifyChecker", '''Use "{0}" instead of "{1}"'''
cc9ead6d1c46 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
180 ),
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: 11145
diff changeset
181 "Y-911": QCoreApplication.translate(
10355
f3187412ecf4 Updated the 'Simplify' checker to support more cases.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10047
diff changeset
182 "SimplifyChecker",
10359
de0420dac60e Corrected some code formatting and style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10355
diff changeset
183 '''Use "{0}.items()" instead of "zip({0}.keys(), {0}.values())"''',
10355
f3187412ecf4 Updated the 'Simplify' checker to support more cases.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10047
diff changeset
184 ),
8186
655b658aa7ee Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
185 }
655b658aa7ee Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
186
655b658aa7ee Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
187 _simplifyMessagesSampleArgs = {
8195
db7f2badd374 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8194
diff changeset
188 # Python-specifics
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: 11145
diff changeset
189 "Y-101": ["foo"],
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: 11145
diff changeset
190 "Y-103": ["foo != bar"],
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: 11145
diff changeset
191 "Y-104": ["iterable"],
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: 11145
diff changeset
192 "Y-105": ["Exception"],
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: 11145
diff changeset
193 "Y-108": ["foo", "bar", "condition", "baz"],
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: 11145
diff changeset
194 "Y-109": ["foo", "[1, 42]", "foo == 1 or foo == 42"],
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: 11145
diff changeset
195 "Y-110": ["check", "foo", "iterable"],
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: 11145
diff changeset
196 "Y-111": ["check", "foo", "iterable"],
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: 11145
diff changeset
197 "Y-112": ["FOO", "foo"],
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: 11145
diff changeset
198 "Y-113": ["foo"],
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: 11145
diff changeset
199 "Y-114": ["foo > 42", "bar < 42"],
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: 11145
diff changeset
200 "Y-116": ["bar_dict.get(foo, 42)"],
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: 11145
diff changeset
201 "Y-117": ["with Foo() as foo, Bar() as bar:"],
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: 11145
diff changeset
202 "Y-118": ["foo", "bar_dict"],
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: 11145
diff changeset
203 "Y-119": ["Foo"],
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: 11145
diff changeset
204 "Y-120": ["Foo"],
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: 11145
diff changeset
205 "Y-121": ["FooBar", "Foo"],
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: 11145
diff changeset
206 "Y-122": ["bar_dict", "'foo'"],
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: 11145
diff changeset
207 "Y-123": ["foo", "fooDict", "bar", "default"],
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: 11145
diff changeset
208 "Y-124": ["foo", "bar"],
8209
14470a65a52e Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8203
diff changeset
209 # Python-specifics not part of flake8-simplify
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: 11145
diff changeset
210 "Y-181": ["foo += 42", "foo = foo + 42"],
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: 11145
diff changeset
211 "Y-182": ["super()"],
8195
db7f2badd374 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8194
diff changeset
212 # Comparations
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: 11145
diff changeset
213 "Y-201": ["foo", "bar"],
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: 11145
diff changeset
214 "Y-202": ["foo", "bar"],
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: 11145
diff changeset
215 "Y-203": ["foo", "bar"],
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: 11145
diff changeset
216 "Y-204": ["foo", "bar"],
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: 11145
diff changeset
217 "Y-205": ["foo", "bar"],
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: 11145
diff changeset
218 "Y-206": ["foo", "bar"],
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: 11145
diff changeset
219 "Y-207": ["foo", "bar"],
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: 11145
diff changeset
220 "Y-208": ["foo"],
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: 11145
diff changeset
221 "Y-211": ["foo", "bool(foo)"],
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: 11145
diff changeset
222 "Y-212": ["foo", "not foo"],
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: 11145
diff changeset
223 "Y-213": ["foo", "bar"],
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: 11145
diff changeset
224 "Y-221": ["foo"],
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: 11145
diff changeset
225 "Y-222": ["foo"],
8211
8322a6f219ff Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8210
diff changeset
226 # Opinionated
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: 11145
diff changeset
227 "Y-301": ["42", "foo"],
8211
8322a6f219ff Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8210
diff changeset
228 # General Code Style
9277
471c5a263d53 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
229 # Additional checks
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: 11145
diff changeset
230 "Y-901": ["foo == bar", "bool(foo == bar)"],
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: 11145
diff changeset
231 "Y-904": ["foo"],
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: 11145
diff changeset
232 "Y-905": [
9278
36448ca469c2 Simplified some code iaw. recommendations of the extended style checker and reformatted the code with black.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9277
diff changeset
233 """["de", "com", "net", "org"]""",
36448ca469c2 Simplified some code iaw. recommendations of the extended style checker and reformatted the code with black.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9277
diff changeset
234 """domains = "de com net org".split()""",
9277
471c5a263d53 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
235 ],
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: 11145
diff changeset
236 "Y-906": ["os.path.join(a, b, c)", "os.path.join(a,os.path.join(b,c))"],
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: 11145
diff changeset
237 "Y-907": ["int", "Union[int, 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: 11145
diff changeset
238 "Y-909": ["foo = foo"],
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: 11145
diff changeset
239 "Y-911": ["foo"],
8186
655b658aa7ee Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
240 }

eric ide

mercurial