Documentation/Source/eric5.Plugins.CheckerPlugins.Pep8.Pep8Fixer.html

changeset 2897
45a5370f89a8
parent 2885
7adb2d9880be
child 2912
9ff696796092
equal deleted inserted replaced
2896:9fa71ee50b3d 2897:45a5370f89a8
70 <td>Constructor</td> 70 <td>Constructor</td>
71 </tr><tr> 71 </tr><tr>
72 <td><a href="#Pep8Fixer.__codeMatch">__codeMatch</a></td> 72 <td><a href="#Pep8Fixer.__codeMatch">__codeMatch</a></td>
73 <td>Private method to check, if the code should be fixed.</td> 73 <td>Private method to check, if the code should be fixed.</td>
74 </tr><tr> 74 </tr><tr>
75 <td><a href="#Pep8Fixer.__finalize">__finalize</a></td>
76 <td>Private method to apply all deferred fixes.</td>
77 </tr><tr>
78 <td><a href="#Pep8Fixer.__findLogical">__findLogical</a></td> 75 <td><a href="#Pep8Fixer.__findLogical">__findLogical</a></td>
79 <td>Private method to extract the index of all the starts and ends of lines.</td> 76 <td>Private method to extract the index of all the starts and ends of lines.</td>
80 </tr><tr> 77 </tr><tr>
81 <td><a href="#Pep8Fixer.__fixE101">__fixE101</a></td> 78 <td><a href="#Pep8Fixer.__fixE101">__fixE101</a></td>
82 <td>Private method to fix obsolete tab usage and indentation errors (E101, E111, W191).</td> 79 <td>Private method to fix obsolete tab usage and indentation errors (E101, E111, W191).</td>
83 </tr><tr> 80 </tr><tr>
84 <td><a href="#Pep8Fixer.__fixE121">__fixE121</a></td> 81 <td><a href="#Pep8Fixer.__fixE121">__fixE121</a></td>
85 <td>Private method to fix the indentation of continuation lines and closing brackets (E121,E124).</td> 82 <td>Private method to fix the indentation of continuation lines and closing brackets (E121, E124).</td>
86 </tr><tr> 83 </tr><tr>
87 <td><a href="#Pep8Fixer.__fixE122">__fixE122</a></td> 84 <td><a href="#Pep8Fixer.__fixE122">__fixE122</a></td>
88 <td>Private method to fix a missing indentation of continuation lines (E122).</td> 85 <td>Private method to fix a missing indentation of continuation lines (E122).</td>
89 </tr><tr> 86 </tr><tr>
90 <td><a href="#Pep8Fixer.__fixE123">__fixE123</a></td> 87 <td><a href="#Pep8Fixer.__fixE123">__fixE123</a></td>
134 </tr><tr> 131 </tr><tr>
135 <td><a href="#Pep8Fixer.__fixE502">__fixE502</a></td> 132 <td><a href="#Pep8Fixer.__fixE502">__fixE502</a></td>
136 <td>Private method to fix redundant backslash within brackets (E502).</td> 133 <td>Private method to fix redundant backslash within brackets (E502).</td>
137 </tr><tr> 134 </tr><tr>
138 <td><a href="#Pep8Fixer.__fixE701">__fixE701</a></td> 135 <td><a href="#Pep8Fixer.__fixE701">__fixE701</a></td>
139 <td>Private method to fix colon-separated compund statements (E701).</td> 136 <td>Private method to fix colon-separated compound statements (E701).</td>
140 </tr><tr> 137 </tr><tr>
141 <td><a href="#Pep8Fixer.__fixE702">__fixE702</a></td> 138 <td><a href="#Pep8Fixer.__fixE702">__fixE702</a></td>
142 <td>Private method to fix semicolon-separated compound statements (E702, E703).</td> 139 <td>Private method to fix semicolon-separated compound statements (E702, E703).</td>
143 </tr><tr> 140 </tr><tr>
144 <td><a href="#Pep8Fixer.__fixE711">__fixE711</a></td> 141 <td><a href="#Pep8Fixer.__fixE711">__fixE711</a></td>
145 <td>Private method to fix comparison with None (E711, E712).</td> 142 <td>Private method to fix comparison with None (E711, E712).</td>
146 </tr><tr> 143 </tr><tr>
144 <td><a href="#Pep8Fixer.__fixN804">__fixN804</a></td>
145 <td>Private method to fix a wrong first argument of normal and class methods (N804, N805).</td>
146 </tr><tr>
147 <td><a href="#Pep8Fixer.__fixN806">__fixN806</a></td>
148 <td>Private method to fix a wrong first argument of static methods (N806).</td>
149 </tr><tr>
147 <td><a href="#Pep8Fixer.__fixReindent">__fixReindent</a></td> 150 <td><a href="#Pep8Fixer.__fixReindent">__fixReindent</a></td>
148 <td>Private method to fix a badly indented line.</td> 151 <td>Private method to fix a badly indented line.</td>
149 </tr><tr> 152 </tr><tr>
150 <td><a href="#Pep8Fixer.__fixW291">__fixW291</a></td> 153 <td><a href="#Pep8Fixer.__fixW291">__fixW291</a></td>
151 <td>Private method to fix trailing whitespace (W291, W293).</td> 154 <td>Private method to fix trailing whitespace (W291, W293).</td>
163 <td>Private method to correct whitespace at the given offset.</td> 166 <td>Private method to correct whitespace at the given offset.</td>
164 </tr><tr> 167 </tr><tr>
165 <td><a href="#Pep8Fixer.__getEol">__getEol</a></td> 168 <td><a href="#Pep8Fixer.__getEol">__getEol</a></td>
166 <td>Private method to get the applicable eol string.</td> 169 <td>Private method to get the applicable eol string.</td>
167 </tr><tr> 170 </tr><tr>
171 <td><a href="#Pep8Fixer.__getID">__getID</a></td>
172 <td>Private method to get the ID for a deferred fix.</td>
173 </tr><tr>
168 <td><a href="#Pep8Fixer.__getIndent">__getIndent</a></td> 174 <td><a href="#Pep8Fixer.__getIndent">__getIndent</a></td>
169 <td>Private method to get the indentation string.</td> 175 <td>Private method to get the indentation string.</td>
170 </tr><tr> 176 </tr><tr>
171 <td><a href="#Pep8Fixer.__getIndentWord">__getIndentWord</a></td> 177 <td><a href="#Pep8Fixer.__getIndentWord">__getIndentWord</a></td>
172 <td>Private method to determine the indentation type.</td> 178 <td>Private method to determine the indentation type.</td>
174 <td><a href="#Pep8Fixer.__getLogical">__getLogical</a></td> 180 <td><a href="#Pep8Fixer.__getLogical">__getLogical</a></td>
175 <td>Private method to get the logical line corresponding to the given position.</td> 181 <td>Private method to get the logical line corresponding to the given position.</td>
176 </tr><tr> 182 </tr><tr>
177 <td><a href="#Pep8Fixer.__multilineStringLines">__multilineStringLines</a></td> 183 <td><a href="#Pep8Fixer.__multilineStringLines">__multilineStringLines</a></td>
178 <td>Private method to determine the line numbers that are within multi line strings and these which are part of a documentation string.</td> 184 <td>Private method to determine the line numbers that are within multi line strings and these which are part of a documentation string.</td>
185 </tr><tr>
186 <td><a href="#Pep8Fixer.finalize">finalize</a></td>
187 <td>Public method to apply all deferred fixes.</td>
179 </tr><tr> 188 </tr><tr>
180 <td><a href="#Pep8Fixer.fixIssue">fixIssue</a></td> 189 <td><a href="#Pep8Fixer.fixIssue">fixIssue</a></td>
181 <td>Public method to fix the fixable issues.</td> 190 <td>Public method to fix the fixable issues.</td>
182 </tr><tr> 191 </tr><tr>
183 <td><a href="#Pep8Fixer.mutualStartswith">mutualStartswith</a></td> 192 <td><a href="#Pep8Fixer.mutualStartswith">mutualStartswith</a></td>
235 </dl><dl> 244 </dl><dl>
236 <dt>Returns:</dt> 245 <dt>Returns:</dt>
237 <dd> 246 <dd>
238 flag indicating it should be fixed (boolean) 247 flag indicating it should be fixed (boolean)
239 </dd> 248 </dd>
240 </dl><a NAME="Pep8Fixer.__finalize" ID="Pep8Fixer.__finalize"></a> 249 </dl><a NAME="Pep8Fixer.__findLogical" ID="Pep8Fixer.__findLogical"></a>
241 <h4>Pep8Fixer.__finalize</h4>
242 <b>__finalize</b>(<i></i>)
243 <p>
244 Private method to apply all deferred fixes.
245 </p><a NAME="Pep8Fixer.__findLogical" ID="Pep8Fixer.__findLogical"></a>
246 <h4>Pep8Fixer.__findLogical</h4> 250 <h4>Pep8Fixer.__findLogical</h4>
247 <b>__findLogical</b>(<i></i>) 251 <b>__findLogical</b>(<i></i>)
248 <p> 252 <p>
249 Private method to extract the index of all the starts and ends of 253 Private method to extract the index of all the starts and ends of
250 lines. 254 lines.
272 position inside line (integer) 276 position inside line (integer)
273 </dd> 277 </dd>
274 </dl><dl> 278 </dl><dl>
275 <dt>Returns:</dt> 279 <dt>Returns:</dt>
276 <dd> 280 <dd>
277 flag indicating an applied fix (boolean) and a message for 281 value indicating an applied/deferred fix (-1, 0, 1),
278 the fix (string) 282 a message for the fix (string) and an ID for a deferred
283 fix (integer)
279 </dd> 284 </dd>
280 </dl><a NAME="Pep8Fixer.__fixE121" ID="Pep8Fixer.__fixE121"></a> 285 </dl><a NAME="Pep8Fixer.__fixE121" ID="Pep8Fixer.__fixE121"></a>
281 <h4>Pep8Fixer.__fixE121</h4> 286 <h4>Pep8Fixer.__fixE121</h4>
282 <b>__fixE121</b>(<i>code, line, pos, apply=False</i>) 287 <b>__fixE121</b>(<i>code, line, pos, apply=False</i>)
283 <p> 288 <p>
284 Private method to fix the indentation of continuation lines and 289 Private method to fix the indentation of continuation lines and
285 closing brackets (E121,E124). 290 closing brackets (E121, E124).
286 </p><dl> 291 </p><dl>
287 <dt><i>code</i></dt> 292 <dt><i>code</i></dt>
288 <dd> 293 <dd>
289 code of the issue (string) 294 code of the issue (string)
290 </dd><dt><i>line</i></dt> 295 </dd><dt><i>line</i></dt>
299 (boolean) 304 (boolean)
300 </dd> 305 </dd>
301 </dl><dl> 306 </dl><dl>
302 <dt>Returns:</dt> 307 <dt>Returns:</dt>
303 <dd> 308 <dd>
304 flag indicating an applied fix (boolean) and a message for 309 value indicating an applied/deferred fix (-1, 0, 1),
305 the fix (string) 310 a message for the fix (string) and an ID for a deferred
311 fix (integer)
306 </dd> 312 </dd>
307 </dl><a NAME="Pep8Fixer.__fixE122" ID="Pep8Fixer.__fixE122"></a> 313 </dl><a NAME="Pep8Fixer.__fixE122" ID="Pep8Fixer.__fixE122"></a>
308 <h4>Pep8Fixer.__fixE122</h4> 314 <h4>Pep8Fixer.__fixE122</h4>
309 <b>__fixE122</b>(<i>code, line, pos, apply=False</i>) 315 <b>__fixE122</b>(<i>code, line, pos, apply=False</i>)
310 <p> 316 <p>
326 (boolean) 332 (boolean)
327 </dd> 333 </dd>
328 </dl><dl> 334 </dl><dl>
329 <dt>Returns:</dt> 335 <dt>Returns:</dt>
330 <dd> 336 <dd>
331 flag indicating an applied fix (boolean) and a message for 337 value indicating an applied/deferred fix (-1, 0, 1),
332 the fix (string) 338 a message for the fix (string) and an ID for a deferred
339 fix (integer)
333 </dd> 340 </dd>
334 </dl><a NAME="Pep8Fixer.__fixE123" ID="Pep8Fixer.__fixE123"></a> 341 </dl><a NAME="Pep8Fixer.__fixE123" ID="Pep8Fixer.__fixE123"></a>
335 <h4>Pep8Fixer.__fixE123</h4> 342 <h4>Pep8Fixer.__fixE123</h4>
336 <b>__fixE123</b>(<i>code, line, pos, apply=False</i>) 343 <b>__fixE123</b>(<i>code, line, pos, apply=False</i>)
337 <p> 344 <p>
353 (boolean) 360 (boolean)
354 </dd> 361 </dd>
355 </dl><dl> 362 </dl><dl>
356 <dt>Returns:</dt> 363 <dt>Returns:</dt>
357 <dd> 364 <dd>
358 flag indicating an applied fix (boolean) and a message for 365 value indicating an applied/deferred fix (-1, 0, 1),
359 the fix (string) 366 a message for the fix (string) and an ID for a deferred
367 fix (integer)
360 </dd> 368 </dd>
361 </dl><a NAME="Pep8Fixer.__fixE125" ID="Pep8Fixer.__fixE125"></a> 369 </dl><a NAME="Pep8Fixer.__fixE125" ID="Pep8Fixer.__fixE125"></a>
362 <h4>Pep8Fixer.__fixE125</h4> 370 <h4>Pep8Fixer.__fixE125</h4>
363 <b>__fixE125</b>(<i>code, line, pos, apply=False</i>) 371 <b>__fixE125</b>(<i>code, line, pos, apply=False</i>)
364 <p> 372 <p>
380 (boolean) 388 (boolean)
381 </dd> 389 </dd>
382 </dl><dl> 390 </dl><dl>
383 <dt>Returns:</dt> 391 <dt>Returns:</dt>
384 <dd> 392 <dd>
385 flag indicating an applied fix (boolean) and a message for 393 value indicating an applied/deferred fix (-1, 0, 1),
386 the fix (string) 394 a message for the fix (string) and an ID for a deferred
395 fix (integer)
387 </dd> 396 </dd>
388 </dl><a NAME="Pep8Fixer.__fixE126" ID="Pep8Fixer.__fixE126"></a> 397 </dl><a NAME="Pep8Fixer.__fixE126" ID="Pep8Fixer.__fixE126"></a>
389 <h4>Pep8Fixer.__fixE126</h4> 398 <h4>Pep8Fixer.__fixE126</h4>
390 <b>__fixE126</b>(<i>code, line, pos, apply=False</i>) 399 <b>__fixE126</b>(<i>code, line, pos, apply=False</i>)
391 <p> 400 <p>
407 (boolean) 416 (boolean)
408 </dd> 417 </dd>
409 </dl><dl> 418 </dl><dl>
410 <dt>Returns:</dt> 419 <dt>Returns:</dt>
411 <dd> 420 <dd>
412 flag indicating an applied fix (boolean) and a message for 421 value indicating an applied/deferred fix (-1, 0, 1),
413 the fix (string) 422 a message for the fix (string) and an ID for a deferred
423 fix (integer)
414 </dd> 424 </dd>
415 </dl><a NAME="Pep8Fixer.__fixE127" ID="Pep8Fixer.__fixE127"></a> 425 </dl><a NAME="Pep8Fixer.__fixE127" ID="Pep8Fixer.__fixE127"></a>
416 <h4>Pep8Fixer.__fixE127</h4> 426 <h4>Pep8Fixer.__fixE127</h4>
417 <b>__fixE127</b>(<i>code, line, pos, apply=False</i>) 427 <b>__fixE127</b>(<i>code, line, pos, apply=False</i>)
418 <p> 428 <p>
433 (boolean) 443 (boolean)
434 </dd> 444 </dd>
435 </dl><dl> 445 </dl><dl>
436 <dt>Returns:</dt> 446 <dt>Returns:</dt>
437 <dd> 447 <dd>
438 flag indicating an applied fix (boolean) and a message for 448 value indicating an applied/deferred fix (-1, 0, 1),
439 the fix (string) 449 a message for the fix (string) and an ID for a deferred
450 fix (integer)
440 </dd> 451 </dd>
441 </dl><a NAME="Pep8Fixer.__fixE201" ID="Pep8Fixer.__fixE201"></a> 452 </dl><a NAME="Pep8Fixer.__fixE201" ID="Pep8Fixer.__fixE201"></a>
442 <h4>Pep8Fixer.__fixE201</h4> 453 <h4>Pep8Fixer.__fixE201</h4>
443 <b>__fixE201</b>(<i>code, line, pos</i>) 454 <b>__fixE201</b>(<i>code, line, pos</i>)
444 <p> 455 <p>
456 position inside line (integer) 467 position inside line (integer)
457 </dd> 468 </dd>
458 </dl><dl> 469 </dl><dl>
459 <dt>Returns:</dt> 470 <dt>Returns:</dt>
460 <dd> 471 <dd>
461 flag indicating an applied fix (boolean) and a message for 472 value indicating an applied/deferred fix (-1, 0, 1),
462 the fix (string) 473 a message for the fix (string) and an ID for a deferred
474 fix (integer)
463 </dd> 475 </dd>
464 </dl><a NAME="Pep8Fixer.__fixE221" ID="Pep8Fixer.__fixE221"></a> 476 </dl><a NAME="Pep8Fixer.__fixE221" ID="Pep8Fixer.__fixE221"></a>
465 <h4>Pep8Fixer.__fixE221</h4> 477 <h4>Pep8Fixer.__fixE221</h4>
466 <b>__fixE221</b>(<i>code, line, pos</i>) 478 <b>__fixE221</b>(<i>code, line, pos</i>)
467 <p> 479 <p>
480 position inside line (integer) 492 position inside line (integer)
481 </dd> 493 </dd>
482 </dl><dl> 494 </dl><dl>
483 <dt>Returns:</dt> 495 <dt>Returns:</dt>
484 <dd> 496 <dd>
485 flag indicating an applied fix (boolean) and a message for 497 value indicating an applied/deferred fix (-1, 0, 1),
486 the fix (string) 498 a message for the fix (string) and an ID for a deferred
499 fix (integer)
487 </dd> 500 </dd>
488 </dl><a NAME="Pep8Fixer.__fixE231" ID="Pep8Fixer.__fixE231"></a> 501 </dl><a NAME="Pep8Fixer.__fixE231" ID="Pep8Fixer.__fixE231"></a>
489 <h4>Pep8Fixer.__fixE231</h4> 502 <h4>Pep8Fixer.__fixE231</h4>
490 <b>__fixE231</b>(<i>code, line, pos</i>) 503 <b>__fixE231</b>(<i>code, line, pos</i>)
491 <p> 504 <p>
502 position inside line (integer) 515 position inside line (integer)
503 </dd> 516 </dd>
504 </dl><dl> 517 </dl><dl>
505 <dt>Returns:</dt> 518 <dt>Returns:</dt>
506 <dd> 519 <dd>
507 flag indicating an applied fix (boolean) and a message for 520 value indicating an applied/deferred fix (-1, 0, 1),
508 the fix (string) 521 a message for the fix (string) and an ID for a deferred
522 fix (integer)
509 </dd> 523 </dd>
510 </dl><a NAME="Pep8Fixer.__fixE251" ID="Pep8Fixer.__fixE251"></a> 524 </dl><a NAME="Pep8Fixer.__fixE251" ID="Pep8Fixer.__fixE251"></a>
511 <h4>Pep8Fixer.__fixE251</h4> 525 <h4>Pep8Fixer.__fixE251</h4>
512 <b>__fixE251</b>(<i>code, line, pos</i>) 526 <b>__fixE251</b>(<i>code, line, pos</i>)
513 <p> 527 <p>
525 position inside line (integer) 539 position inside line (integer)
526 </dd> 540 </dd>
527 </dl><dl> 541 </dl><dl>
528 <dt>Returns:</dt> 542 <dt>Returns:</dt>
529 <dd> 543 <dd>
530 flag indicating an applied fix (boolean) and a message for 544 value indicating an applied/deferred fix (-1, 0, 1),
531 the fix (string) 545 a message for the fix (string) and an ID for a deferred
546 fix (integer)
532 </dd> 547 </dd>
533 </dl><a NAME="Pep8Fixer.__fixE261" ID="Pep8Fixer.__fixE261"></a> 548 </dl><a NAME="Pep8Fixer.__fixE261" ID="Pep8Fixer.__fixE261"></a>
534 <h4>Pep8Fixer.__fixE261</h4> 549 <h4>Pep8Fixer.__fixE261</h4>
535 <b>__fixE261</b>(<i>code, line, pos</i>) 550 <b>__fixE261</b>(<i>code, line, pos</i>)
536 <p> 551 <p>
548 position inside line (integer) 563 position inside line (integer)
549 </dd> 564 </dd>
550 </dl><dl> 565 </dl><dl>
551 <dt>Returns:</dt> 566 <dt>Returns:</dt>
552 <dd> 567 <dd>
553 flag indicating an applied fix (boolean) and a message for 568 value indicating an applied/deferred fix (-1, 0, 1),
554 the fix (string) 569 a message for the fix (string) and an ID for a deferred
570 fix (integer)
555 </dd> 571 </dd>
556 </dl><a NAME="Pep8Fixer.__fixE301" ID="Pep8Fixer.__fixE301"></a> 572 </dl><a NAME="Pep8Fixer.__fixE301" ID="Pep8Fixer.__fixE301"></a>
557 <h4>Pep8Fixer.__fixE301</h4> 573 <h4>Pep8Fixer.__fixE301</h4>
558 <b>__fixE301</b>(<i>code, line, pos, apply=False</i>) 574 <b>__fixE301</b>(<i>code, line, pos, apply=False</i>)
559 <p> 575 <p>
574 (boolean) 590 (boolean)
575 </dd> 591 </dd>
576 </dl><dl> 592 </dl><dl>
577 <dt>Returns:</dt> 593 <dt>Returns:</dt>
578 <dd> 594 <dd>
579 flag indicating an applied fix (boolean) and a message for 595 value indicating an applied/deferred fix (-1, 0, 1),
580 the fix (string) 596 a message for the fix (string) and an ID for a deferred
597 fix (integer)
581 </dd> 598 </dd>
582 </dl><a NAME="Pep8Fixer.__fixE302" ID="Pep8Fixer.__fixE302"></a> 599 </dl><a NAME="Pep8Fixer.__fixE302" ID="Pep8Fixer.__fixE302"></a>
583 <h4>Pep8Fixer.__fixE302</h4> 600 <h4>Pep8Fixer.__fixE302</h4>
584 <b>__fixE302</b>(<i>code, line, pos, apply=False</i>) 601 <b>__fixE302</b>(<i>code, line, pos, apply=False</i>)
585 <p> 602 <p>
600 (boolean) 617 (boolean)
601 </dd> 618 </dd>
602 </dl><dl> 619 </dl><dl>
603 <dt>Returns:</dt> 620 <dt>Returns:</dt>
604 <dd> 621 <dd>
605 flag indicating an applied fix (boolean) and a message for 622 value indicating an applied/deferred fix (-1, 0, 1),
606 the fix (string) 623 a message for the fix (string) and an ID for a deferred
624 fix (integer)
607 </dd> 625 </dd>
608 </dl><a NAME="Pep8Fixer.__fixE303" ID="Pep8Fixer.__fixE303"></a> 626 </dl><a NAME="Pep8Fixer.__fixE303" ID="Pep8Fixer.__fixE303"></a>
609 <h4>Pep8Fixer.__fixE303</h4> 627 <h4>Pep8Fixer.__fixE303</h4>
610 <b>__fixE303</b>(<i>code, line, pos, apply=False</i>) 628 <b>__fixE303</b>(<i>code, line, pos, apply=False</i>)
611 <p> 629 <p>
626 (boolean) 644 (boolean)
627 </dd> 645 </dd>
628 </dl><dl> 646 </dl><dl>
629 <dt>Returns:</dt> 647 <dt>Returns:</dt>
630 <dd> 648 <dd>
631 flag indicating an applied fix (boolean) and a message for 649 value indicating an applied/deferred fix (-1, 0, 1),
632 the fix (string) 650 a message for the fix (string) and an ID for a deferred
651 fix (integer)
633 </dd> 652 </dd>
634 </dl><a NAME="Pep8Fixer.__fixE304" ID="Pep8Fixer.__fixE304"></a> 653 </dl><a NAME="Pep8Fixer.__fixE304" ID="Pep8Fixer.__fixE304"></a>
635 <h4>Pep8Fixer.__fixE304</h4> 654 <h4>Pep8Fixer.__fixE304</h4>
636 <b>__fixE304</b>(<i>code, line, pos, apply=False</i>) 655 <b>__fixE304</b>(<i>code, line, pos, apply=False</i>)
637 <p> 656 <p>
653 (boolean) 672 (boolean)
654 </dd> 673 </dd>
655 </dl><dl> 674 </dl><dl>
656 <dt>Returns:</dt> 675 <dt>Returns:</dt>
657 <dd> 676 <dd>
658 flag indicating an applied fix (boolean) and a message for 677 value indicating an applied/deferred fix (-1, 0, 1),
659 the fix (string) 678 a message for the fix (string) and an ID for a deferred
679 fix (integer)
660 </dd> 680 </dd>
661 </dl><a NAME="Pep8Fixer.__fixE401" ID="Pep8Fixer.__fixE401"></a> 681 </dl><a NAME="Pep8Fixer.__fixE401" ID="Pep8Fixer.__fixE401"></a>
662 <h4>Pep8Fixer.__fixE401</h4> 682 <h4>Pep8Fixer.__fixE401</h4>
663 <b>__fixE401</b>(<i>code, line, pos, apply=False</i>) 683 <b>__fixE401</b>(<i>code, line, pos, apply=False</i>)
664 <p> 684 <p>
679 (boolean) 699 (boolean)
680 </dd> 700 </dd>
681 </dl><dl> 701 </dl><dl>
682 <dt>Returns:</dt> 702 <dt>Returns:</dt>
683 <dd> 703 <dd>
684 flag indicating an applied fix (boolean) and a message for 704 value indicating an applied/deferred fix (-1, 0, 1),
685 the fix (string) 705 a message for the fix (string) and an ID for a deferred
706 fix (integer)
686 </dd> 707 </dd>
687 </dl><a NAME="Pep8Fixer.__fixE501" ID="Pep8Fixer.__fixE501"></a> 708 </dl><a NAME="Pep8Fixer.__fixE501" ID="Pep8Fixer.__fixE501"></a>
688 <h4>Pep8Fixer.__fixE501</h4> 709 <h4>Pep8Fixer.__fixE501</h4>
689 <b>__fixE501</b>(<i>code, line, pos, apply=False</i>) 710 <b>__fixE501</b>(<i>code, line, pos, apply=False</i>)
690 <p> 711 <p>
705 (boolean) 726 (boolean)
706 </dd> 727 </dd>
707 </dl><dl> 728 </dl><dl>
708 <dt>Returns:</dt> 729 <dt>Returns:</dt>
709 <dd> 730 <dd>
710 flag indicating an applied fix (boolean) and a message for 731 value indicating an applied/deferred fix (-1, 0, 1),
711 the fix (string) 732 a message for the fix (string) and an ID for a deferred
733 fix (integer)
712 </dd> 734 </dd>
713 </dl><a NAME="Pep8Fixer.__fixE502" ID="Pep8Fixer.__fixE502"></a> 735 </dl><a NAME="Pep8Fixer.__fixE502" ID="Pep8Fixer.__fixE502"></a>
714 <h4>Pep8Fixer.__fixE502</h4> 736 <h4>Pep8Fixer.__fixE502</h4>
715 <b>__fixE502</b>(<i>code, line, pos</i>) 737 <b>__fixE502</b>(<i>code, line, pos</i>)
716 <p> 738 <p>
727 position inside line (integer) 749 position inside line (integer)
728 </dd> 750 </dd>
729 </dl><dl> 751 </dl><dl>
730 <dt>Returns:</dt> 752 <dt>Returns:</dt>
731 <dd> 753 <dd>
732 flag indicating an applied fix (boolean) and a message for 754 value indicating an applied/deferred fix (-1, 0, 1),
733 the fix (string) 755 a message for the fix (string) and an ID for a deferred
756 fix (integer)
734 </dd> 757 </dd>
735 </dl><a NAME="Pep8Fixer.__fixE701" ID="Pep8Fixer.__fixE701"></a> 758 </dl><a NAME="Pep8Fixer.__fixE701" ID="Pep8Fixer.__fixE701"></a>
736 <h4>Pep8Fixer.__fixE701</h4> 759 <h4>Pep8Fixer.__fixE701</h4>
737 <b>__fixE701</b>(<i>code, line, pos, apply=False</i>) 760 <b>__fixE701</b>(<i>code, line, pos, apply=False</i>)
738 <p> 761 <p>
739 Private method to fix colon-separated compund statements (E701). 762 Private method to fix colon-separated compound statements (E701).
740 </p><dl> 763 </p><dl>
741 <dt><i>code</i></dt> 764 <dt><i>code</i></dt>
742 <dd> 765 <dd>
743 code of the issue (string) 766 code of the issue (string)
744 </dd><dt><i>line</i></dt> 767 </dd><dt><i>line</i></dt>
753 (boolean) 776 (boolean)
754 </dd> 777 </dd>
755 </dl><dl> 778 </dl><dl>
756 <dt>Returns:</dt> 779 <dt>Returns:</dt>
757 <dd> 780 <dd>
758 flag indicating an applied fix (boolean) and a message for 781 value indicating an applied/deferred fix (-1, 0, 1),
759 the fix (string) 782 a message for the fix (string) and an ID for a deferred
783 fix (integer)
760 </dd> 784 </dd>
761 </dl><a NAME="Pep8Fixer.__fixE702" ID="Pep8Fixer.__fixE702"></a> 785 </dl><a NAME="Pep8Fixer.__fixE702" ID="Pep8Fixer.__fixE702"></a>
762 <h4>Pep8Fixer.__fixE702</h4> 786 <h4>Pep8Fixer.__fixE702</h4>
763 <b>__fixE702</b>(<i>code, line, pos, apply=False</i>) 787 <b>__fixE702</b>(<i>code, line, pos, apply=False</i>)
764 <p> 788 <p>
780 (boolean) 804 (boolean)
781 </dd> 805 </dd>
782 </dl><dl> 806 </dl><dl>
783 <dt>Returns:</dt> 807 <dt>Returns:</dt>
784 <dd> 808 <dd>
785 flag indicating an applied fix (boolean) and a message for 809 value indicating an applied/deferred fix (-1, 0, 1),
786 the fix (string) 810 a message for the fix (string) and an ID for a deferred
811 fix (integer)
787 </dd> 812 </dd>
788 </dl><a NAME="Pep8Fixer.__fixE711" ID="Pep8Fixer.__fixE711"></a> 813 </dl><a NAME="Pep8Fixer.__fixE711" ID="Pep8Fixer.__fixE711"></a>
789 <h4>Pep8Fixer.__fixE711</h4> 814 <h4>Pep8Fixer.__fixE711</h4>
790 <b>__fixE711</b>(<i>code, line, pos</i>) 815 <b>__fixE711</b>(<i>code, line, pos</i>)
791 <p> 816 <p>
802 position inside line (integer) 827 position inside line (integer)
803 </dd> 828 </dd>
804 </dl><dl> 829 </dl><dl>
805 <dt>Returns:</dt> 830 <dt>Returns:</dt>
806 <dd> 831 <dd>
807 flag indicating an applied fix (boolean) and a message for 832 value indicating an applied/deferred fix (-1, 0, 1),
808 the fix (string) 833 a message for the fix (string) and an ID for a deferred
834 fix (integer)
835 </dd>
836 </dl><a NAME="Pep8Fixer.__fixN804" ID="Pep8Fixer.__fixN804"></a>
837 <h4>Pep8Fixer.__fixN804</h4>
838 <b>__fixN804</b>(<i>code, line, pos, apply=False</i>)
839 <p>
840 Private method to fix a wrong first argument of normal and
841 class methods (N804, N805).
842 </p><dl>
843 <dt><i>code</i></dt>
844 <dd>
845 code of the issue (string)
846 </dd><dt><i>line</i></dt>
847 <dd>
848 line number of the issue (integer)
849 </dd><dt><i>pos</i></dt>
850 <dd>
851 position inside line (integer)
852 </dd><dt><i>apply=</i></dt>
853 <dd>
854 flag indicating, that the fix should be applied
855 (boolean)
856 </dd>
857 </dl><dl>
858 <dt>Returns:</dt>
859 <dd>
860 value indicating an applied/deferred fix (-1, 0, 1),
861 a message for the fix (string) and an ID for a deferred
862 fix (integer)
863 </dd>
864 </dl><a NAME="Pep8Fixer.__fixN806" ID="Pep8Fixer.__fixN806"></a>
865 <h4>Pep8Fixer.__fixN806</h4>
866 <b>__fixN806</b>(<i>code, line, pos, apply=False</i>)
867 <p>
868 Private method to fix a wrong first argument of static methods
869 (N806).
870 </p><dl>
871 <dt><i>code</i></dt>
872 <dd>
873 code of the issue (string)
874 </dd><dt><i>line</i></dt>
875 <dd>
876 line number of the issue (integer)
877 </dd><dt><i>pos</i></dt>
878 <dd>
879 position inside line (integer)
880 </dd><dt><i>apply=</i></dt>
881 <dd>
882 flag indicating, that the fix should be applied
883 (boolean)
884 </dd>
885 </dl><dl>
886 <dt>Returns:</dt>
887 <dd>
888 value indicating an applied/deferred fix (-1, 0, 1),
889 a message for the fix (string) and an ID for a deferred
890 fix (integer)
809 </dd> 891 </dd>
810 </dl><a NAME="Pep8Fixer.__fixReindent" ID="Pep8Fixer.__fixReindent"></a> 892 </dl><a NAME="Pep8Fixer.__fixReindent" ID="Pep8Fixer.__fixReindent"></a>
811 <h4>Pep8Fixer.__fixReindent</h4> 893 <h4>Pep8Fixer.__fixReindent</h4>
812 <b>__fixReindent</b>(<i>line, pos, logical</i>) 894 <b>__fixReindent</b>(<i>line, pos, logical</i>)
813 <p> 895 <p>
844 position inside line (integer) 926 position inside line (integer)
845 </dd> 927 </dd>
846 </dl><dl> 928 </dl><dl>
847 <dt>Returns:</dt> 929 <dt>Returns:</dt>
848 <dd> 930 <dd>
849 flag indicating an applied fix (boolean) and a message for 931 value indicating an applied/deferred fix (-1, 0, 1),
850 the fix (string) 932 a message for the fix (string) and an ID for a deferred
933 fix (integer)
851 </dd> 934 </dd>
852 </dl><a NAME="Pep8Fixer.__fixW292" ID="Pep8Fixer.__fixW292"></a> 935 </dl><a NAME="Pep8Fixer.__fixW292" ID="Pep8Fixer.__fixW292"></a>
853 <h4>Pep8Fixer.__fixW292</h4> 936 <h4>Pep8Fixer.__fixW292</h4>
854 <b>__fixW292</b>(<i>code, line, pos</i>) 937 <b>__fixW292</b>(<i>code, line, pos</i>)
855 <p> 938 <p>
866 position inside line (integer) 949 position inside line (integer)
867 </dd> 950 </dd>
868 </dl><dl> 951 </dl><dl>
869 <dt>Returns:</dt> 952 <dt>Returns:</dt>
870 <dd> 953 <dd>
871 flag indicating an applied fix (boolean) and a message for 954 value indicating an applied/deferred fix (-1, 0, 1),
872 the fix (string) 955 a message for the fix (string) and an ID for a deferred
956 fix (integer)
873 </dd> 957 </dd>
874 </dl><a NAME="Pep8Fixer.__fixW391" ID="Pep8Fixer.__fixW391"></a> 958 </dl><a NAME="Pep8Fixer.__fixW391" ID="Pep8Fixer.__fixW391"></a>
875 <h4>Pep8Fixer.__fixW391</h4> 959 <h4>Pep8Fixer.__fixW391</h4>
876 <b>__fixW391</b>(<i>code, line, pos</i>) 960 <b>__fixW391</b>(<i>code, line, pos</i>)
877 <p> 961 <p>
888 position inside line (integer) 972 position inside line (integer)
889 </dd> 973 </dd>
890 </dl><dl> 974 </dl><dl>
891 <dt>Returns:</dt> 975 <dt>Returns:</dt>
892 <dd> 976 <dd>
893 flag indicating an applied fix (boolean) and a message for 977 value indicating an applied/deferred fix (-1, 0, 1),
894 the fix (string) 978 a message for the fix (string) and an ID for a deferred
979 fix (integer)
895 </dd> 980 </dd>
896 </dl><a NAME="Pep8Fixer.__fixW603" ID="Pep8Fixer.__fixW603"></a> 981 </dl><a NAME="Pep8Fixer.__fixW603" ID="Pep8Fixer.__fixW603"></a>
897 <h4>Pep8Fixer.__fixW603</h4> 982 <h4>Pep8Fixer.__fixW603</h4>
898 <b>__fixW603</b>(<i>code, line, pos</i>) 983 <b>__fixW603</b>(<i>code, line, pos</i>)
899 <p> 984 <p>
910 position inside line (integer) 995 position inside line (integer)
911 </dd> 996 </dd>
912 </dl><dl> 997 </dl><dl>
913 <dt>Returns:</dt> 998 <dt>Returns:</dt>
914 <dd> 999 <dd>
915 flag indicating an applied fix (boolean) and a message for 1000 value indicating an applied/deferred fix (-1, 0, 1),
916 the fix (string) 1001 a message for the fix (string) and an ID for a deferred
1002 fix (integer)
917 </dd> 1003 </dd>
918 </dl><a NAME="Pep8Fixer.__fixWhitespace" ID="Pep8Fixer.__fixWhitespace"></a> 1004 </dl><a NAME="Pep8Fixer.__fixWhitespace" ID="Pep8Fixer.__fixWhitespace"></a>
919 <h4>Pep8Fixer.__fixWhitespace</h4> 1005 <h4>Pep8Fixer.__fixWhitespace</h4>
920 <b>__fixWhitespace</b>(<i>line, offset, replacement</i>) 1006 <b>__fixWhitespace</b>(<i>line, offset, replacement</i>)
921 <p> 1007 <p>
943 Private method to get the applicable eol string. 1029 Private method to get the applicable eol string.
944 </p><dl> 1030 </p><dl>
945 <dt>Returns:</dt> 1031 <dt>Returns:</dt>
946 <dd> 1032 <dd>
947 eol string (string) 1033 eol string (string)
1034 </dd>
1035 </dl><a NAME="Pep8Fixer.__getID" ID="Pep8Fixer.__getID"></a>
1036 <h4>Pep8Fixer.__getID</h4>
1037 <b>__getID</b>(<i></i>)
1038 <p>
1039 Private method to get the ID for a deferred fix.
1040 </p><dl>
1041 <dt>Returns:</dt>
1042 <dd>
1043 ID for a deferred fix (integer)
948 </dd> 1044 </dd>
949 </dl><a NAME="Pep8Fixer.__getIndent" ID="Pep8Fixer.__getIndent"></a> 1045 </dl><a NAME="Pep8Fixer.__getIndent" ID="Pep8Fixer.__getIndent"></a>
950 <h4>Pep8Fixer.__getIndent</h4> 1046 <h4>Pep8Fixer.__getIndent</h4>
951 <b>__getIndent</b>(<i>line</i>) 1047 <b>__getIndent</b>(<i>line</i>)
952 <p> 1048 <p>
1004 <dd> 1100 <dd>
1005 tuple of a set of line numbers belonging to a multi line 1101 tuple of a set of line numbers belonging to a multi line
1006 string and a set of line numbers belonging to a multi line 1102 string and a set of line numbers belonging to a multi line
1007 documentation string (tuple of two set of integer) 1103 documentation string (tuple of two set of integer)
1008 </dd> 1104 </dd>
1009 </dl><a NAME="Pep8Fixer.fixIssue" ID="Pep8Fixer.fixIssue"></a> 1105 </dl><a NAME="Pep8Fixer.finalize" ID="Pep8Fixer.finalize"></a>
1106 <h4>Pep8Fixer.finalize</h4>
1107 <b>finalize</b>(<i></i>)
1108 <p>
1109 Public method to apply all deferred fixes.
1110 </p><a NAME="Pep8Fixer.fixIssue" ID="Pep8Fixer.fixIssue"></a>
1010 <h4>Pep8Fixer.fixIssue</h4> 1111 <h4>Pep8Fixer.fixIssue</h4>
1011 <b>fixIssue</b>(<i>line, pos, message</i>) 1112 <b>fixIssue</b>(<i>line, pos, message</i>)
1012 <p> 1113 <p>
1013 Public method to fix the fixable issues. 1114 Public method to fix the fixable issues.
1014 </p><dl> 1115 </p><dl>
1023 message text (string) 1124 message text (string)
1024 </dd> 1125 </dd>
1025 </dl><dl> 1126 </dl><dl>
1026 <dt>Returns:</dt> 1127 <dt>Returns:</dt>
1027 <dd> 1128 <dd>
1028 flag indicating an applied fix (boolean) and a message for 1129 value indicating an applied/deferred fix (-1, 0, 1),
1029 the fix (string) 1130 a message for the fix (string) and an ID for a deferred
1131 fix (integer)
1030 </dd> 1132 </dd>
1031 </dl><a NAME="Pep8Fixer.mutualStartswith" ID="Pep8Fixer.mutualStartswith"></a> 1133 </dl><a NAME="Pep8Fixer.mutualStartswith" ID="Pep8Fixer.mutualStartswith"></a>
1032 <h4>Pep8Fixer.mutualStartswith</h4> 1134 <h4>Pep8Fixer.mutualStartswith</h4>
1033 <b>mutualStartswith</b>(<i>b</i>) 1135 <b>mutualStartswith</b>(<i>b</i>)
1034 <p> 1136 <p>

eric ide

mercurial