56 "M186": QCoreApplication.translate( |
56 "M186": QCoreApplication.translate( |
57 "MiscellaneousChecker", "unnecessary {0} call - rewrite as a literal" |
57 "MiscellaneousChecker", "unnecessary {0} call - rewrite as a literal" |
58 ), |
58 ), |
59 "M187a": QCoreApplication.translate( |
59 "M187a": QCoreApplication.translate( |
60 "MiscellaneousChecker", |
60 "MiscellaneousChecker", |
61 "unnecessary {0} call around {1}()" " - toggle reverse argument to sorted()", |
61 "unnecessary {0} call around {1}() - toggle reverse argument to sorted()", |
62 ), |
62 ), |
63 "M187b": QCoreApplication.translate( |
63 "M187b": QCoreApplication.translate( |
64 "MiscellaneousChecker", |
64 "MiscellaneousChecker", |
65 "unnecessary {0} call around {1}() - use sorted(..., reverse={2})", |
65 "unnecessary {0} call around {1}() - use sorted(..., reverse={2})", |
66 ), |
66 ), |
103 "M201": QCoreApplication.translate( |
103 "M201": QCoreApplication.translate( |
104 "MiscellaneousChecker", "sort keys - '{0}' should be before '{1}'" |
104 "MiscellaneousChecker", "sort keys - '{0}' should be before '{1}'" |
105 ), |
105 ), |
106 "M301": QCoreApplication.translate( |
106 "M301": QCoreApplication.translate( |
107 "MiscellaneousChecker", |
107 "MiscellaneousChecker", |
108 "use of 'datetime.datetime()' without 'tzinfo' argument should be" " avoided", |
108 "use of 'datetime.datetime()' without 'tzinfo' argument should be avoided", |
109 ), |
109 ), |
110 "M302": QCoreApplication.translate( |
110 "M302": QCoreApplication.translate( |
111 "MiscellaneousChecker", |
111 "MiscellaneousChecker", |
112 "use of 'datetime.datetime.today()' should be avoided.\n" |
112 "use of 'datetime.datetime.today()' should be avoided.\n" |
113 "Use 'datetime.datetime.now(tz=)' instead.", |
113 "Use 'datetime.datetime.now(tz=)' instead.", |
122 "use of 'datetime.datetime.utcfromtimestamp()' should be avoided.\n" |
122 "use of 'datetime.datetime.utcfromtimestamp()' should be avoided.\n" |
123 "Use 'datetime.datetime.fromtimestamp(, tz=)' instead.", |
123 "Use 'datetime.datetime.fromtimestamp(, tz=)' instead.", |
124 ), |
124 ), |
125 "M305": QCoreApplication.translate( |
125 "M305": QCoreApplication.translate( |
126 "MiscellaneousChecker", |
126 "MiscellaneousChecker", |
127 "use of 'datetime.datetime.now()' without 'tz' argument should be" " avoided", |
127 "use of 'datetime.datetime.now()' without 'tz' argument should be avoided", |
128 ), |
128 ), |
129 "M306": QCoreApplication.translate( |
129 "M306": QCoreApplication.translate( |
130 "MiscellaneousChecker", |
130 "MiscellaneousChecker", |
131 "use of 'datetime.datetime.fromtimestamp()' without 'tz' argument" |
131 "use of 'datetime.datetime.fromtimestamp()' without 'tz' argument" |
132 " should be avoided", |
132 " should be avoided", |
162 "MiscellaneousChecker", |
162 "MiscellaneousChecker", |
163 "use of 'datetime.date.fromisoformat()' should be avoided", |
163 "use of 'datetime.date.fromisoformat()' should be avoided", |
164 ), |
164 ), |
165 "M321": QCoreApplication.translate( |
165 "M321": QCoreApplication.translate( |
166 "MiscellaneousChecker", |
166 "MiscellaneousChecker", |
167 "use of 'datetime.time()' without 'tzinfo' argument should be" " avoided", |
167 "use of 'datetime.time()' without 'tzinfo' argument should be avoided", |
168 ), |
168 ), |
169 "M401": QCoreApplication.translate( |
169 "M401": QCoreApplication.translate( |
170 "MiscellaneousChecker", |
170 "MiscellaneousChecker", |
171 "'sys.version[:3]' referenced (Python 3.10), use 'sys.version_info'", |
171 "'sys.version[:3]' referenced (Python 3.10), use 'sys.version_info'", |
172 ), |
172 ), |
174 "MiscellaneousChecker", |
174 "MiscellaneousChecker", |
175 "'sys.version[2]' referenced (Python 3.10), use 'sys.version_info'", |
175 "'sys.version[2]' referenced (Python 3.10), use 'sys.version_info'", |
176 ), |
176 ), |
177 "M403": QCoreApplication.translate( |
177 "M403": QCoreApplication.translate( |
178 "MiscellaneousChecker", |
178 "MiscellaneousChecker", |
179 "'sys.version' compared to string (Python 3.10), use" " 'sys.version_info'", |
179 "'sys.version' compared to string (Python 3.10), use 'sys.version_info'", |
180 ), |
180 ), |
181 "M411": QCoreApplication.translate( |
181 "M411": QCoreApplication.translate( |
182 "MiscellaneousChecker", |
182 "MiscellaneousChecker", |
183 "'sys.version_info[0] == 3' referenced (Python 4), use '>='", |
183 "'sys.version_info[0] == 3' referenced (Python 4), use '>='", |
184 ), |
184 ), |
199 "MiscellaneousChecker", |
199 "MiscellaneousChecker", |
200 "'sys.version[0]' referenced (Python 10), use 'sys.version_info'", |
200 "'sys.version[0]' referenced (Python 10), use 'sys.version_info'", |
201 ), |
201 ), |
202 "M422": QCoreApplication.translate( |
202 "M422": QCoreApplication.translate( |
203 "MiscellaneousChecker", |
203 "MiscellaneousChecker", |
204 "'sys.version' compared to string (Python 10)," " use 'sys.version_info'", |
204 "'sys.version' compared to string (Python 10), use 'sys.version_info'", |
205 ), |
205 ), |
206 "M423": QCoreApplication.translate( |
206 "M423": QCoreApplication.translate( |
207 "MiscellaneousChecker", |
207 "MiscellaneousChecker", |
208 "'sys.version[:1]' referenced (Python 10), use 'sys.version_info'", |
208 "'sys.version[:1]' referenced (Python 10), use 'sys.version_info'", |
209 ), |
209 ), |