src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.CodeStyleFixer.html

branch
eric7
changeset 10070
9f5758c0fec1
parent 9236
db53a9efe7ef
child 10259
b51dfacef37f
equal deleted inserted replaced
10069:435cc5875135 10070:9f5758c0fec1
82 <td><a href="#CodeStyleFixer.__fixBlankLinesBefore">__fixBlankLinesBefore</a></td> 82 <td><a href="#CodeStyleFixer.__fixBlankLinesBefore">__fixBlankLinesBefore</a></td>
83 <td>Private method to fix the need for blank lines before class, function and method definitions.</td> 83 <td>Private method to fix the need for blank lines before class, function and method definitions.</td>
84 </tr> 84 </tr>
85 <tr> 85 <tr>
86 <td><a href="#CodeStyleFixer.__fixD111">__fixD111</a></td> 86 <td><a href="#CodeStyleFixer.__fixD111">__fixD111</a></td>
87 <td>Private method to fix docstring enclosed in wrong quotes.</td> 87 <td></td>
88 </tr> 88 </tr>
89 <tr> 89 <tr>
90 <td><a href="#CodeStyleFixer.__fixD112">__fixD112</a></td> 90 <td><a href="#CodeStyleFixer.__fixD112">__fixD112</a></td>
91 <td>Private method to fix docstring 'r' in leading quotes.</td> 91 <td></td>
92 </tr> 92 </tr>
93 <tr> 93 <tr>
94 <td><a href="#CodeStyleFixer.__fixD121">__fixD121</a></td> 94 <td><a href="#CodeStyleFixer.__fixD121">__fixD121</a></td>
95 <td>Private method to fix a single line docstring on multiple lines.</td> 95 <td>Private method to fix a single line docstring on multiple lines.</td>
96 </tr> 96 </tr>
97 <tr> 97 <tr>
98 <td><a href="#CodeStyleFixer.__fixD131">__fixD131</a></td> 98 <td><a href="#CodeStyleFixer.__fixD131">__fixD131</a></td>
99 <td>Private method to fix a docstring summary not ending with a period.</td> 99 <td></td>
100 </tr> 100 </tr>
101 <tr> 101 <tr>
102 <td><a href="#CodeStyleFixer.__fixD141">__fixD141</a></td> 102 <td><a href="#CodeStyleFixer.__fixD141">__fixD141</a></td>
103 <td>Private method to fix a function/method docstring preceded by a blank line.</td> 103 <td>Private method to fix a function/method docstring preceded by a blank line.</td>
104 </tr> 104 </tr>
134 <td><a href="#CodeStyleFixer.__fixD247">__fixD247</a></td> 134 <td><a href="#CodeStyleFixer.__fixD247">__fixD247</a></td>
135 <td>Private method to fix a last paragraph of a docstring followed by a blank line.</td> 135 <td>Private method to fix a last paragraph of a docstring followed by a blank line.</td>
136 </tr> 136 </tr>
137 <tr> 137 <tr>
138 <td><a href="#CodeStyleFixer.__fixE101">__fixE101</a></td> 138 <td><a href="#CodeStyleFixer.__fixE101">__fixE101</a></td>
139 <td>Private method to fix obsolete tab usage and indentation errors.</td> 139 <td></td>
140 </tr> 140 </tr>
141 <tr> 141 <tr>
142 <td><a href="#CodeStyleFixer.__fixE121">__fixE121</a></td> 142 <td><a href="#CodeStyleFixer.__fixE121">__fixE121</a></td>
143 <td>Private method to fix the indentation of continuation lines and closing brackets.</td> 143 <td>Private method to fix the indentation of continuation lines and closing brackets.</td>
144 </tr> 144 </tr>
162 <td><a href="#CodeStyleFixer.__fixE127">__fixE127</a></td> 162 <td><a href="#CodeStyleFixer.__fixE127">__fixE127</a></td>
163 <td>Private method to fix over/under indented lines.</td> 163 <td>Private method to fix over/under indented lines.</td>
164 </tr> 164 </tr>
165 <tr> 165 <tr>
166 <td><a href="#CodeStyleFixer.__fixE201">__fixE201</a></td> 166 <td><a href="#CodeStyleFixer.__fixE201">__fixE201</a></td>
167 <td>Private method to fix extraneous whitespace.</td> 167 <td></td>
168 </tr> 168 </tr>
169 <tr> 169 <tr>
170 <td><a href="#CodeStyleFixer.__fixE221">__fixE221</a></td> 170 <td><a href="#CodeStyleFixer.__fixE221">__fixE221</a></td>
171 <td>Private method to fix extraneous whitespace around operator or keyword.</td> 171 <td></td>
172 </tr> 172 </tr>
173 <tr> 173 <tr>
174 <td><a href="#CodeStyleFixer.__fixE225">__fixE225</a></td> 174 <td><a href="#CodeStyleFixer.__fixE225">__fixE225</a></td>
175 <td>Private method to fix extraneous whitespaces around operator.</td> 175 <td></td>
176 </tr> 176 </tr>
177 <tr> 177 <tr>
178 <td><a href="#CodeStyleFixer.__fixE231">__fixE231</a></td> 178 <td><a href="#CodeStyleFixer.__fixE231">__fixE231</a></td>
179 <td>Private method to fix missing whitespace after ',;:'.</td> 179 <td></td>
180 </tr> 180 </tr>
181 <tr> 181 <tr>
182 <td><a href="#CodeStyleFixer.__fixE251">__fixE251</a></td> 182 <td><a href="#CodeStyleFixer.__fixE251">__fixE251</a></td>
183 <td>Private method to fix extraneous whitespace around keyword and default parameter equals.</td> 183 <td></td>
184 </tr> 184 </tr>
185 <tr> 185 <tr>
186 <td><a href="#CodeStyleFixer.__fixE261">__fixE261</a></td> 186 <td><a href="#CodeStyleFixer.__fixE261">__fixE261</a></td>
187 <td>Private method to fix whitespace before or after inline comment.</td> 187 <td></td>
188 </tr> 188 </tr>
189 <tr> 189 <tr>
190 <td><a href="#CodeStyleFixer.__fixE304">__fixE304</a></td> 190 <td><a href="#CodeStyleFixer.__fixE304">__fixE304</a></td>
191 <td>Private method to fix superfluous blank lines after a function decorator.</td> 191 <td>Private method to fix superfluous blank lines after a function decorator.</td>
192 </tr> 192 </tr>
198 <td><a href="#CodeStyleFixer.__fixE501">__fixE501</a></td> 198 <td><a href="#CodeStyleFixer.__fixE501">__fixE501</a></td>
199 <td>Private method to fix the long lines by breaking them.</td> 199 <td>Private method to fix the long lines by breaking them.</td>
200 </tr> 200 </tr>
201 <tr> 201 <tr>
202 <td><a href="#CodeStyleFixer.__fixE502">__fixE502</a></td> 202 <td><a href="#CodeStyleFixer.__fixE502">__fixE502</a></td>
203 <td>Private method to fix redundant backslash within brackets.</td> 203 <td></td>
204 </tr> 204 </tr>
205 <tr> 205 <tr>
206 <td><a href="#CodeStyleFixer.__fixE701">__fixE701</a></td> 206 <td><a href="#CodeStyleFixer.__fixE701">__fixE701</a></td>
207 <td>Private method to fix colon-separated compound statements.</td> 207 <td>Private method to fix colon-separated compound statements.</td>
208 </tr> 208 </tr>
210 <td><a href="#CodeStyleFixer.__fixE702">__fixE702</a></td> 210 <td><a href="#CodeStyleFixer.__fixE702">__fixE702</a></td>
211 <td>Private method to fix semicolon-separated compound statements.</td> 211 <td>Private method to fix semicolon-separated compound statements.</td>
212 </tr> 212 </tr>
213 <tr> 213 <tr>
214 <td><a href="#CodeStyleFixer.__fixE711">__fixE711</a></td> 214 <td><a href="#CodeStyleFixer.__fixE711">__fixE711</a></td>
215 <td>Private method to fix comparison with None.</td> 215 <td></td>
216 </tr> 216 </tr>
217 <tr> 217 <tr>
218 <td><a href="#CodeStyleFixer.__fixN804">__fixN804</a></td> 218 <td><a href="#CodeStyleFixer.__fixN804">__fixN804</a></td>
219 <td>Private method to fix a wrong first argument of normal and class methods.</td> 219 <td>Private method to fix a wrong first argument of normal and class methods.</td>
220 </tr> 220 </tr>
222 <td><a href="#CodeStyleFixer.__fixN806">__fixN806</a></td> 222 <td><a href="#CodeStyleFixer.__fixN806">__fixN806</a></td>
223 <td>Private method to fix a wrong first argument of static methods.</td> 223 <td>Private method to fix a wrong first argument of static methods.</td>
224 </tr> 224 </tr>
225 <tr> 225 <tr>
226 <td><a href="#CodeStyleFixer.__fixReindent">__fixReindent</a></td> 226 <td><a href="#CodeStyleFixer.__fixReindent">__fixReindent</a></td>
227 <td>Private method to fix a badly indented line.</td> 227 <td></td>
228 </tr> 228 </tr>
229 <tr> 229 <tr>
230 <td><a href="#CodeStyleFixer.__fixW291">__fixW291</a></td> 230 <td><a href="#CodeStyleFixer.__fixW291">__fixW291</a></td>
231 <td>Private method to fix trailing whitespace.</td> 231 <td></td>
232 </tr> 232 </tr>
233 <tr> 233 <tr>
234 <td><a href="#CodeStyleFixer.__fixW292">__fixW292</a></td> 234 <td><a href="#CodeStyleFixer.__fixW292">__fixW292</a></td>
235 <td>Private method to fix a missing newline at the end of file.</td> 235 <td></td>
236 </tr> 236 </tr>
237 <tr> 237 <tr>
238 <td><a href="#CodeStyleFixer.__fixW391">__fixW391</a></td> 238 <td><a href="#CodeStyleFixer.__fixW391">__fixW391</a></td>
239 <td>Private method to fix trailing blank lines.</td> 239 <td></td>
240 </tr> 240 </tr>
241 <tr> 241 <tr>
242 <td><a href="#CodeStyleFixer.__fixW603">__fixW603</a></td> 242 <td><a href="#CodeStyleFixer.__fixW603">__fixW603</a></td>
243 <td>Private method to fix the not equal notation.</td> 243 <td></td>
244 </tr> 244 </tr>
245 <tr> 245 <tr>
246 <td><a href="#CodeStyleFixer.__fixWhitespace">__fixWhitespace</a></td> 246 <td><a href="#CodeStyleFixer.__fixWhitespace">__fixWhitespace</a></td>
247 <td>Private method to correct whitespace at the given offset.</td> 247 <td>Private method to correct whitespace at the given offset.</td>
248 </tr> 248 </tr>
421 </dl> 421 </dl>
422 <a NAME="CodeStyleFixer.__fixD111" ID="CodeStyleFixer.__fixD111"></a> 422 <a NAME="CodeStyleFixer.__fixD111" ID="CodeStyleFixer.__fixD111"></a>
423 <h4>CodeStyleFixer.__fixD111</h4> 423 <h4>CodeStyleFixer.__fixD111</h4>
424 <b>__fixD111</b>(<i>code, line, pos</i>) 424 <b>__fixD111</b>(<i>code, line, pos</i>)
425 425
426 <p>
427 Private method to fix docstring enclosed in wrong quotes.
428 </p>
429 <p>
430 Codes: D111
431 </p>
432 <dl>
433
434 <dt><i>code</i> (str)</dt>
435 <dd>
436 code of the issue
437 </dd>
438 <dt><i>line</i> (int)</dt>
439 <dd>
440 line number of the issue
441 </dd>
442 <dt><i>pos</i> (int)</dt>
443 <dd>
444 position inside line
445 </dd>
446 </dl>
447 <dl>
448 <dt>Return:</dt>
449 <dd>
450 value indicating an applied/deferred fix (-1, 0, 1),
451 a message code for the fix, a list of arguments for the
452 message and an ID for a deferred fix
453 </dd>
454 </dl>
455 <dl>
456 <dt>Return Type:</dt>
457 <dd>
458 tuple of (int, str, list or int, int)
459 </dd>
460 </dl>
461 <a NAME="CodeStyleFixer.__fixD112" ID="CodeStyleFixer.__fixD112"></a> 426 <a NAME="CodeStyleFixer.__fixD112" ID="CodeStyleFixer.__fixD112"></a>
462 <h4>CodeStyleFixer.__fixD112</h4> 427 <h4>CodeStyleFixer.__fixD112</h4>
463 <b>__fixD112</b>(<i>code, line, pos</i>) 428 <b>__fixD112</b>(<i>code, line, pos</i>)
464 429
465 <p>
466 Private method to fix docstring 'r' in leading quotes.
467 </p>
468 <p>
469 Codes: D112
470 </p>
471 <dl>
472
473 <dt><i>code</i> (str)</dt>
474 <dd>
475 code of the issue
476 </dd>
477 <dt><i>line</i> (int)</dt>
478 <dd>
479 line number of the issue
480 </dd>
481 <dt><i>pos</i> (int)</dt>
482 <dd>
483 position inside line
484 </dd>
485 </dl>
486 <dl>
487 <dt>Return:</dt>
488 <dd>
489 value indicating an applied/deferred fix (-1, 0, 1),
490 a message code for the fix, a list of arguments for the
491 message and an ID for a deferred fix
492 </dd>
493 </dl>
494 <dl>
495 <dt>Return Type:</dt>
496 <dd>
497 tuple of (int, str, list or int, int)
498 </dd>
499 </dl>
500 <a NAME="CodeStyleFixer.__fixD121" ID="CodeStyleFixer.__fixD121"></a> 430 <a NAME="CodeStyleFixer.__fixD121" ID="CodeStyleFixer.__fixD121"></a>
501 <h4>CodeStyleFixer.__fixD121</h4> 431 <h4>CodeStyleFixer.__fixD121</h4>
502 <b>__fixD121</b>(<i>code, line, pos, apply=False</i>) 432 <b>__fixD121</b>(<i>code, line, pos, apply=False</i>)
503 433
504 <p> 434 <p>
542 </dl> 472 </dl>
543 <a NAME="CodeStyleFixer.__fixD131" ID="CodeStyleFixer.__fixD131"></a> 473 <a NAME="CodeStyleFixer.__fixD131" ID="CodeStyleFixer.__fixD131"></a>
544 <h4>CodeStyleFixer.__fixD131</h4> 474 <h4>CodeStyleFixer.__fixD131</h4>
545 <b>__fixD131</b>(<i>code, line, pos</i>) 475 <b>__fixD131</b>(<i>code, line, pos</i>)
546 476
547 <p>
548 Private method to fix a docstring summary not ending with a
549 period.
550 </p>
551 <p>
552 Codes: D131
553 </p>
554 <dl>
555
556 <dt><i>code</i> (str)</dt>
557 <dd>
558 code of the issue
559 </dd>
560 <dt><i>line</i> (int)</dt>
561 <dd>
562 line number of the issue
563 </dd>
564 <dt><i>pos</i> (int)</dt>
565 <dd>
566 position inside line
567 </dd>
568 </dl>
569 <dl>
570 <dt>Return:</dt>
571 <dd>
572 value indicating an applied/deferred fix (-1, 0, 1),
573 a message code for the fix, a list of arguments for the
574 message and an ID for a deferred fix
575 </dd>
576 </dl>
577 <dl>
578 <dt>Return Type:</dt>
579 <dd>
580 tuple of (int, str, list or int, int)
581 </dd>
582 </dl>
583 <a NAME="CodeStyleFixer.__fixD141" ID="CodeStyleFixer.__fixD141"></a> 477 <a NAME="CodeStyleFixer.__fixD141" ID="CodeStyleFixer.__fixD141"></a>
584 <h4>CodeStyleFixer.__fixD141</h4> 478 <h4>CodeStyleFixer.__fixD141</h4>
585 <b>__fixD141</b>(<i>code, line, pos, apply=False</i>) 479 <b>__fixD141</b>(<i>code, line, pos, apply=False</i>)
586 480
587 <p> 481 <p>
978 </dl> 872 </dl>
979 <a NAME="CodeStyleFixer.__fixE101" ID="CodeStyleFixer.__fixE101"></a> 873 <a NAME="CodeStyleFixer.__fixE101" ID="CodeStyleFixer.__fixE101"></a>
980 <h4>CodeStyleFixer.__fixE101</h4> 874 <h4>CodeStyleFixer.__fixE101</h4>
981 <b>__fixE101</b>(<i>code, line, pos</i>) 875 <b>__fixE101</b>(<i>code, line, pos</i>)
982 876
983 <p>
984 Private method to fix obsolete tab usage and indentation errors.
985 </p>
986 <p>
987 Codes: E101, E111, W191
988 </p>
989 <dl>
990
991 <dt><i>code</i> (str)</dt>
992 <dd>
993 code of the issue
994 </dd>
995 <dt><i>line</i> (int)</dt>
996 <dd>
997 line number of the issue
998 </dd>
999 <dt><i>pos</i> (int)</dt>
1000 <dd>
1001 position inside line
1002 </dd>
1003 </dl>
1004 <dl>
1005 <dt>Return:</dt>
1006 <dd>
1007 value indicating an applied/deferred fix (-1, 0, 1),
1008 a message code for the fix, a list of arguments for the
1009 message and an ID for a deferred fix
1010 </dd>
1011 </dl>
1012 <dl>
1013 <dt>Return Type:</dt>
1014 <dd>
1015 tuple of (int, str, list or int, int)
1016 </dd>
1017 </dl>
1018 <a NAME="CodeStyleFixer.__fixE121" ID="CodeStyleFixer.__fixE121"></a> 877 <a NAME="CodeStyleFixer.__fixE121" ID="CodeStyleFixer.__fixE121"></a>
1019 <h4>CodeStyleFixer.__fixE121</h4> 878 <h4>CodeStyleFixer.__fixE121</h4>
1020 <b>__fixE121</b>(<i>code, line, pos, apply=False</i>) 879 <b>__fixE121</b>(<i>code, line, pos, apply=False</i>)
1021 880
1022 <p> 881 <p>
1278 </dl> 1137 </dl>
1279 <a NAME="CodeStyleFixer.__fixE201" ID="CodeStyleFixer.__fixE201"></a> 1138 <a NAME="CodeStyleFixer.__fixE201" ID="CodeStyleFixer.__fixE201"></a>
1280 <h4>CodeStyleFixer.__fixE201</h4> 1139 <h4>CodeStyleFixer.__fixE201</h4>
1281 <b>__fixE201</b>(<i>code, line, pos</i>) 1140 <b>__fixE201</b>(<i>code, line, pos</i>)
1282 1141
1283 <p>
1284 Private method to fix extraneous whitespace.
1285 </p>
1286 <p>
1287 Codes: E201, E202, E203, E211
1288 </p>
1289 <dl>
1290
1291 <dt><i>code</i> (str)</dt>
1292 <dd>
1293 code of the issue
1294 </dd>
1295 <dt><i>line</i> (int)</dt>
1296 <dd>
1297 line number of the issue
1298 </dd>
1299 <dt><i>pos</i> (int)</dt>
1300 <dd>
1301 position inside line
1302 </dd>
1303 </dl>
1304 <dl>
1305 <dt>Return:</dt>
1306 <dd>
1307 value indicating an applied/deferred fix (-1, 0, 1),
1308 a message code for the fix, a list of arguments for the
1309 message and an ID for a deferred fix
1310 </dd>
1311 </dl>
1312 <dl>
1313 <dt>Return Type:</dt>
1314 <dd>
1315 tuple of (int, str, list or int, int)
1316 </dd>
1317 </dl>
1318 <a NAME="CodeStyleFixer.__fixE221" ID="CodeStyleFixer.__fixE221"></a> 1142 <a NAME="CodeStyleFixer.__fixE221" ID="CodeStyleFixer.__fixE221"></a>
1319 <h4>CodeStyleFixer.__fixE221</h4> 1143 <h4>CodeStyleFixer.__fixE221</h4>
1320 <b>__fixE221</b>(<i>code, line, pos</i>) 1144 <b>__fixE221</b>(<i>code, line, pos</i>)
1321 1145
1322 <p>
1323 Private method to fix extraneous whitespace around operator or
1324 keyword.
1325 </p>
1326 <p>
1327 Codes: E221, E222, E223, E224, E241, E242, E271, E272, E273, E274
1328 </p>
1329 <dl>
1330
1331 <dt><i>code</i> (str)</dt>
1332 <dd>
1333 code of the issue
1334 </dd>
1335 <dt><i>line</i> (int)</dt>
1336 <dd>
1337 line number of the issue
1338 </dd>
1339 <dt><i>pos</i> (int)</dt>
1340 <dd>
1341 position inside line
1342 </dd>
1343 </dl>
1344 <dl>
1345 <dt>Return:</dt>
1346 <dd>
1347 value indicating an applied/deferred fix (-1, 0, 1),
1348 a message code for the fix, a list of arguments for the
1349 message and an ID for a deferred fix
1350 </dd>
1351 </dl>
1352 <dl>
1353 <dt>Return Type:</dt>
1354 <dd>
1355 tuple of (int, str, list or int, int)
1356 </dd>
1357 </dl>
1358 <a NAME="CodeStyleFixer.__fixE225" ID="CodeStyleFixer.__fixE225"></a> 1146 <a NAME="CodeStyleFixer.__fixE225" ID="CodeStyleFixer.__fixE225"></a>
1359 <h4>CodeStyleFixer.__fixE225</h4> 1147 <h4>CodeStyleFixer.__fixE225</h4>
1360 <b>__fixE225</b>(<i>code, line, pos</i>) 1148 <b>__fixE225</b>(<i>code, line, pos</i>)
1361 1149
1362 <p>
1363 Private method to fix extraneous whitespaces around operator.
1364 </p>
1365 <p>
1366 Codes: E225, E226, E227, E228
1367 </p>
1368 <dl>
1369
1370 <dt><i>code</i> (str)</dt>
1371 <dd>
1372 code of the issue
1373 </dd>
1374 <dt><i>line</i> (int)</dt>
1375 <dd>
1376 line number of the issue
1377 </dd>
1378 <dt><i>pos</i> (int)</dt>
1379 <dd>
1380 position inside line
1381 </dd>
1382 </dl>
1383 <dl>
1384 <dt>Return:</dt>
1385 <dd>
1386 value indicating an applied/deferred fix (-1, 0, 1),
1387 a message code for the fix, a list of arguments for the
1388 message and an ID for a deferred fix
1389 </dd>
1390 </dl>
1391 <dl>
1392 <dt>Return Type:</dt>
1393 <dd>
1394 tuple of (int, str, list or int, int)
1395 </dd>
1396 </dl>
1397 <a NAME="CodeStyleFixer.__fixE231" ID="CodeStyleFixer.__fixE231"></a> 1150 <a NAME="CodeStyleFixer.__fixE231" ID="CodeStyleFixer.__fixE231"></a>
1398 <h4>CodeStyleFixer.__fixE231</h4> 1151 <h4>CodeStyleFixer.__fixE231</h4>
1399 <b>__fixE231</b>(<i>code, line, pos</i>) 1152 <b>__fixE231</b>(<i>code, line, pos</i>)
1400 1153
1401 <p>
1402 Private method to fix missing whitespace after ',;:'.
1403 </p>
1404 <p>
1405 Codes: E231
1406 </p>
1407 <dl>
1408
1409 <dt><i>code</i> (str)</dt>
1410 <dd>
1411 code of the issue
1412 </dd>
1413 <dt><i>line</i> (int)</dt>
1414 <dd>
1415 line number of the issue
1416 </dd>
1417 <dt><i>pos</i> (int)</dt>
1418 <dd>
1419 position inside line
1420 </dd>
1421 </dl>
1422 <dl>
1423 <dt>Return:</dt>
1424 <dd>
1425 value indicating an applied/deferred fix (-1, 0, 1),
1426 a message code for the fix, a list of arguments for the
1427 message and an ID for a deferred fix
1428 </dd>
1429 </dl>
1430 <dl>
1431 <dt>Return Type:</dt>
1432 <dd>
1433 tuple of (int, str, list or int, int)
1434 </dd>
1435 </dl>
1436 <a NAME="CodeStyleFixer.__fixE251" ID="CodeStyleFixer.__fixE251"></a> 1154 <a NAME="CodeStyleFixer.__fixE251" ID="CodeStyleFixer.__fixE251"></a>
1437 <h4>CodeStyleFixer.__fixE251</h4> 1155 <h4>CodeStyleFixer.__fixE251</h4>
1438 <b>__fixE251</b>(<i>code, line, pos</i>) 1156 <b>__fixE251</b>(<i>code, line, pos</i>)
1439 1157
1440 <p>
1441 Private method to fix extraneous whitespace around keyword and
1442 default parameter equals.
1443 </p>
1444 <p>
1445 Codes: E251
1446 </p>
1447 <dl>
1448
1449 <dt><i>code</i> (str)</dt>
1450 <dd>
1451 code of the issue
1452 </dd>
1453 <dt><i>line</i> (int)</dt>
1454 <dd>
1455 line number of the issue
1456 </dd>
1457 <dt><i>pos</i> (int)</dt>
1458 <dd>
1459 position inside line
1460 </dd>
1461 </dl>
1462 <dl>
1463 <dt>Return:</dt>
1464 <dd>
1465 value indicating an applied/deferred fix (-1, 0, 1),
1466 a message code for the fix, a list of arguments for the
1467 message and an ID for a deferred fix
1468 </dd>
1469 </dl>
1470 <dl>
1471 <dt>Return Type:</dt>
1472 <dd>
1473 tuple of (int, str, list or int, int)
1474 </dd>
1475 </dl>
1476 <a NAME="CodeStyleFixer.__fixE261" ID="CodeStyleFixer.__fixE261"></a> 1158 <a NAME="CodeStyleFixer.__fixE261" ID="CodeStyleFixer.__fixE261"></a>
1477 <h4>CodeStyleFixer.__fixE261</h4> 1159 <h4>CodeStyleFixer.__fixE261</h4>
1478 <b>__fixE261</b>(<i>code, line, pos</i>) 1160 <b>__fixE261</b>(<i>code, line, pos</i>)
1479 1161
1480 <p>
1481 Private method to fix whitespace before or after inline comment.
1482 </p>
1483 <p>
1484 Codes: E261, E262
1485 </p>
1486 <dl>
1487
1488 <dt><i>code</i> (str)</dt>
1489 <dd>
1490 code of the issue
1491 </dd>
1492 <dt><i>line</i> (int)</dt>
1493 <dd>
1494 line number of the issue
1495 </dd>
1496 <dt><i>pos</i> (int)</dt>
1497 <dd>
1498 position inside line
1499 </dd>
1500 </dl>
1501 <dl>
1502 <dt>Return:</dt>
1503 <dd>
1504 value indicating an applied/deferred fix (-1, 0, 1),
1505 a message code for the fix, a list of arguments for the
1506 message and an ID for a deferred fix
1507 </dd>
1508 </dl>
1509 <dl>
1510 <dt>Return Type:</dt>
1511 <dd>
1512 tuple of (int, str, list or int, int)
1513 </dd>
1514 </dl>
1515 <a NAME="CodeStyleFixer.__fixE304" ID="CodeStyleFixer.__fixE304"></a> 1162 <a NAME="CodeStyleFixer.__fixE304" ID="CodeStyleFixer.__fixE304"></a>
1516 <h4>CodeStyleFixer.__fixE304</h4> 1163 <h4>CodeStyleFixer.__fixE304</h4>
1517 <b>__fixE304</b>(<i>code, line, pos, apply=False</i>) 1164 <b>__fixE304</b>(<i>code, line, pos, apply=False</i>)
1518 1165
1519 <p> 1166 <p>
1644 </dl> 1291 </dl>
1645 <a NAME="CodeStyleFixer.__fixE502" ID="CodeStyleFixer.__fixE502"></a> 1292 <a NAME="CodeStyleFixer.__fixE502" ID="CodeStyleFixer.__fixE502"></a>
1646 <h4>CodeStyleFixer.__fixE502</h4> 1293 <h4>CodeStyleFixer.__fixE502</h4>
1647 <b>__fixE502</b>(<i>code, line, pos</i>) 1294 <b>__fixE502</b>(<i>code, line, pos</i>)
1648 1295
1649 <p>
1650 Private method to fix redundant backslash within brackets.
1651 </p>
1652 <p>
1653 Codes: E502
1654 </p>
1655 <dl>
1656
1657 <dt><i>code</i> (str)</dt>
1658 <dd>
1659 code of the issue
1660 </dd>
1661 <dt><i>line</i> (int)</dt>
1662 <dd>
1663 line number of the issue
1664 </dd>
1665 <dt><i>pos</i> (int)</dt>
1666 <dd>
1667 position inside line
1668 </dd>
1669 </dl>
1670 <dl>
1671 <dt>Return:</dt>
1672 <dd>
1673 value indicating an applied/deferred fix (-1, 0, 1),
1674 a message code for the fix, a list of arguments for the
1675 message and an ID for a deferred fix
1676 </dd>
1677 </dl>
1678 <dl>
1679 <dt>Return Type:</dt>
1680 <dd>
1681 tuple of (int, str, list or int, int)
1682 </dd>
1683 </dl>
1684 <a NAME="CodeStyleFixer.__fixE701" ID="CodeStyleFixer.__fixE701"></a> 1296 <a NAME="CodeStyleFixer.__fixE701" ID="CodeStyleFixer.__fixE701"></a>
1685 <h4>CodeStyleFixer.__fixE701</h4> 1297 <h4>CodeStyleFixer.__fixE701</h4>
1686 <b>__fixE701</b>(<i>code, line, pos, apply=False</i>) 1298 <b>__fixE701</b>(<i>code, line, pos, apply=False</i>)
1687 1299
1688 <p> 1300 <p>
1769 </dl> 1381 </dl>
1770 <a NAME="CodeStyleFixer.__fixE711" ID="CodeStyleFixer.__fixE711"></a> 1382 <a NAME="CodeStyleFixer.__fixE711" ID="CodeStyleFixer.__fixE711"></a>
1771 <h4>CodeStyleFixer.__fixE711</h4> 1383 <h4>CodeStyleFixer.__fixE711</h4>
1772 <b>__fixE711</b>(<i>code, line, pos</i>) 1384 <b>__fixE711</b>(<i>code, line, pos</i>)
1773 1385
1774 <p>
1775 Private method to fix comparison with None.
1776 </p>
1777 <p>
1778 Codes: E711, E712
1779 </p>
1780 <dl>
1781
1782 <dt><i>code</i> (str)</dt>
1783 <dd>
1784 code of the issue
1785 </dd>
1786 <dt><i>line</i> (int)</dt>
1787 <dd>
1788 line number of the issue
1789 </dd>
1790 <dt><i>pos</i> (int)</dt>
1791 <dd>
1792 position inside line
1793 </dd>
1794 </dl>
1795 <dl>
1796 <dt>Return:</dt>
1797 <dd>
1798 value indicating an applied/deferred fix (-1, 0, 1),
1799 a message code for the fix, a list of arguments for the
1800 message and an ID for a deferred fix
1801 </dd>
1802 </dl>
1803 <dl>
1804 <dt>Return Type:</dt>
1805 <dd>
1806 tuple of (int, str, list or int, int)
1807 </dd>
1808 </dl>
1809 <a NAME="CodeStyleFixer.__fixN804" ID="CodeStyleFixer.__fixN804"></a> 1386 <a NAME="CodeStyleFixer.__fixN804" ID="CodeStyleFixer.__fixN804"></a>
1810 <h4>CodeStyleFixer.__fixN804</h4> 1387 <h4>CodeStyleFixer.__fixN804</h4>
1811 <b>__fixN804</b>(<i>code, line, pos, apply=False</i>) 1388 <b>__fixN804</b>(<i>code, line, pos, apply=False</i>)
1812 1389
1813 <p> 1390 <p>
1895 </dl> 1472 </dl>
1896 <a NAME="CodeStyleFixer.__fixReindent" ID="CodeStyleFixer.__fixReindent"></a> 1473 <a NAME="CodeStyleFixer.__fixReindent" ID="CodeStyleFixer.__fixReindent"></a>
1897 <h4>CodeStyleFixer.__fixReindent</h4> 1474 <h4>CodeStyleFixer.__fixReindent</h4>
1898 <b>__fixReindent</b>(<i>line, pos, logical</i>) 1475 <b>__fixReindent</b>(<i>line, pos, logical</i>)
1899 1476
1900 <p>
1901 Private method to fix a badly indented line.
1902 </p>
1903 <p>
1904 This is done by adding or removing from its initial indent only.
1905 </p>
1906 <dl>
1907
1908 <dt><i>line</i></dt>
1909 <dd>
1910 line number of the issue (integer)
1911 </dd>
1912 <dt><i>pos</i></dt>
1913 <dd>
1914 position inside line (integer)
1915 </dd>
1916 <dt><i>logical</i></dt>
1917 <dd>
1918 logical line structure
1919 </dd>
1920 </dl>
1921 <dl>
1922 <dt>Return:</dt>
1923 <dd>
1924 flag indicating a change was done (boolean)
1925 </dd>
1926 </dl>
1927 <dl>
1928
1929 <dt>Raises <b>ValueError</b>:</dt>
1930 <dd>
1931 raised to indicate a bad 'logical' parameter
1932 </dd>
1933 </dl>
1934 <a NAME="CodeStyleFixer.__fixW291" ID="CodeStyleFixer.__fixW291"></a> 1477 <a NAME="CodeStyleFixer.__fixW291" ID="CodeStyleFixer.__fixW291"></a>
1935 <h4>CodeStyleFixer.__fixW291</h4> 1478 <h4>CodeStyleFixer.__fixW291</h4>
1936 <b>__fixW291</b>(<i>code, line, pos</i>) 1479 <b>__fixW291</b>(<i>code, line, pos</i>)
1937 1480
1938 <p>
1939 Private method to fix trailing whitespace.
1940 </p>
1941 <p>
1942 Codes: W291, W293
1943 </p>
1944 <dl>
1945
1946 <dt><i>code</i> (str)</dt>
1947 <dd>
1948 code of the issue
1949 </dd>
1950 <dt><i>line</i> (int)</dt>
1951 <dd>
1952 line number of the issue
1953 </dd>
1954 <dt><i>pos</i> (int)</dt>
1955 <dd>
1956 position inside line
1957 </dd>
1958 </dl>
1959 <dl>
1960 <dt>Return:</dt>
1961 <dd>
1962 value indicating an applied/deferred fix (-1, 0, 1),
1963 a message code for the fix, a list of arguments for the
1964 message and an ID for a deferred fix
1965 </dd>
1966 </dl>
1967 <dl>
1968 <dt>Return Type:</dt>
1969 <dd>
1970 tuple of (int, str, list or int, int)
1971 </dd>
1972 </dl>
1973 <a NAME="CodeStyleFixer.__fixW292" ID="CodeStyleFixer.__fixW292"></a> 1481 <a NAME="CodeStyleFixer.__fixW292" ID="CodeStyleFixer.__fixW292"></a>
1974 <h4>CodeStyleFixer.__fixW292</h4> 1482 <h4>CodeStyleFixer.__fixW292</h4>
1975 <b>__fixW292</b>(<i>code, line, pos</i>) 1483 <b>__fixW292</b>(<i>code, line, pos</i>)
1976 1484
1977 <p>
1978 Private method to fix a missing newline at the end of file.
1979 </p>
1980 <p>
1981 Codes: W292
1982 </p>
1983 <dl>
1984
1985 <dt><i>code</i> (str)</dt>
1986 <dd>
1987 code of the issue
1988 </dd>
1989 <dt><i>line</i> (int)</dt>
1990 <dd>
1991 line number of the issue
1992 </dd>
1993 <dt><i>pos</i> (int)</dt>
1994 <dd>
1995 position inside line
1996 </dd>
1997 </dl>
1998 <dl>
1999 <dt>Return:</dt>
2000 <dd>
2001 value indicating an applied/deferred fix (-1, 0, 1),
2002 a message code for the fix, a list of arguments for the
2003 message and an ID for a deferred fix
2004 </dd>
2005 </dl>
2006 <dl>
2007 <dt>Return Type:</dt>
2008 <dd>
2009 tuple of (int, str, list or int, int)
2010 </dd>
2011 </dl>
2012 <a NAME="CodeStyleFixer.__fixW391" ID="CodeStyleFixer.__fixW391"></a> 1485 <a NAME="CodeStyleFixer.__fixW391" ID="CodeStyleFixer.__fixW391"></a>
2013 <h4>CodeStyleFixer.__fixW391</h4> 1486 <h4>CodeStyleFixer.__fixW391</h4>
2014 <b>__fixW391</b>(<i>code, line, pos</i>) 1487 <b>__fixW391</b>(<i>code, line, pos</i>)
2015 1488
2016 <p>
2017 Private method to fix trailing blank lines.
2018 </p>
2019 <p>
2020 Codes: W391
2021 </p>
2022 <dl>
2023
2024 <dt><i>code</i> (str)</dt>
2025 <dd>
2026 code of the issue
2027 </dd>
2028 <dt><i>line</i> (int)</dt>
2029 <dd>
2030 line number of the issue
2031 </dd>
2032 <dt><i>pos</i> (int)</dt>
2033 <dd>
2034 position inside line
2035 </dd>
2036 </dl>
2037 <dl>
2038 <dt>Return:</dt>
2039 <dd>
2040 value indicating an applied/deferred fix (-1, 0, 1),
2041 a message code for the fix, a list of arguments for the
2042 message and an ID for a deferred fix
2043 </dd>
2044 </dl>
2045 <dl>
2046 <dt>Return Type:</dt>
2047 <dd>
2048 tuple of (int, str, list or int, int)
2049 </dd>
2050 </dl>
2051 <a NAME="CodeStyleFixer.__fixW603" ID="CodeStyleFixer.__fixW603"></a> 1489 <a NAME="CodeStyleFixer.__fixW603" ID="CodeStyleFixer.__fixW603"></a>
2052 <h4>CodeStyleFixer.__fixW603</h4> 1490 <h4>CodeStyleFixer.__fixW603</h4>
2053 <b>__fixW603</b>(<i>code, line, pos</i>) 1491 <b>__fixW603</b>(<i>code, line, pos</i>)
2054 1492
2055 <p>
2056 Private method to fix the not equal notation.
2057 </p>
2058 <p>
2059 Codes: W603
2060 </p>
2061 <dl>
2062
2063 <dt><i>code</i> (str)</dt>
2064 <dd>
2065 code of the issue
2066 </dd>
2067 <dt><i>line</i> (int)</dt>
2068 <dd>
2069 line number of the issue
2070 </dd>
2071 <dt><i>pos</i> (int)</dt>
2072 <dd>
2073 position inside line
2074 </dd>
2075 </dl>
2076 <dl>
2077 <dt>Return:</dt>
2078 <dd>
2079 value indicating an applied/deferred fix (-1, 0, 1),
2080 a message code for the fix, a list of arguments for the
2081 message and an ID for a deferred fix
2082 </dd>
2083 </dl>
2084 <dl>
2085 <dt>Return Type:</dt>
2086 <dd>
2087 tuple of (int, str, list or int, int)
2088 </dd>
2089 </dl>
2090 <a NAME="CodeStyleFixer.__fixWhitespace" ID="CodeStyleFixer.__fixWhitespace"></a> 1493 <a NAME="CodeStyleFixer.__fixWhitespace" ID="CodeStyleFixer.__fixWhitespace"></a>
2091 <h4>CodeStyleFixer.__fixWhitespace</h4> 1494 <h4>CodeStyleFixer.__fixWhitespace</h4>
2092 <b>__fixWhitespace</b>(<i>line, offset, replacement</i>) 1495 <b>__fixWhitespace</b>(<i>line, offset, replacement</i>)
2093 1496
2094 <p> 1497 <p>

eric ide

mercurial