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

changeset 2876
bfa39cf40277
parent 2868
8d30ec21e9c7
child 2878
61042247f793
equal deleted inserted replaced
2875:1267f0663801 2876:bfa39cf40277
31 <table> 31 <table>
32 <tr> 32 <tr>
33 <td><a href="#Pep8Fixer">Pep8Fixer</a></td> 33 <td><a href="#Pep8Fixer">Pep8Fixer</a></td>
34 <td>Class implementing a fixer for certain PEP 8 issues.</td> 34 <td>Class implementing a fixer for certain PEP 8 issues.</td>
35 </tr><tr> 35 </tr><tr>
36 <td><a href="#Pep8IndentationWrapper">Pep8IndentationWrapper</a></td>
37 <td>Class used by fixers dealing with indentation.</td>
38 </tr><tr>
36 <td><a href="#Pep8Reindenter">Pep8Reindenter</a></td> 39 <td><a href="#Pep8Reindenter">Pep8Reindenter</a></td>
37 <td>Class to reindent badly-indented code to uniformly use four-space indentation.</td> 40 <td>Class to reindent badly-indented code to uniformly use four-space indentation.</td>
38 </tr> 41 </tr>
39 </table> 42 </table>
40 <h3>Functions</h3> 43 <h3>Functions</h3>
64 <td>Constructor</td> 67 <td>Constructor</td>
65 </tr><tr> 68 </tr><tr>
66 <td><a href="#Pep8Fixer.__finalize">__finalize</a></td> 69 <td><a href="#Pep8Fixer.__finalize">__finalize</a></td>
67 <td>Private method to apply all deferred fixes.</td> 70 <td>Private method to apply all deferred fixes.</td>
68 </tr><tr> 71 </tr><tr>
72 <td><a href="#Pep8Fixer.__findLogical">__findLogical</a></td>
73 <td>Private method to extract the index of all the starts and ends of lines.</td>
74 </tr><tr>
69 <td><a href="#Pep8Fixer.__fixE101">__fixE101</a></td> 75 <td><a href="#Pep8Fixer.__fixE101">__fixE101</a></td>
70 <td>Private method to fix obsolete tab usage and indentation errors (E101, E111, W191).</td> 76 <td>Private method to fix obsolete tab usage and indentation errors (E101, E111, W191).</td>
71 </tr><tr> 77 </tr><tr>
78 <td><a href="#Pep8Fixer.__fixE121">__fixE121</a></td>
79 <td>Private method to fix the indentation of continuation lines and closing brackets (E121,E124).</td>
80 </tr><tr>
81 <td><a href="#Pep8Fixer.__fixE122">__fixE122</a></td>
82 <td>Private method to fix a missing indentation of continuation lines (E122).</td>
83 </tr><tr>
84 <td><a href="#Pep8Fixer.__fixE123">__fixE123</a></td>
85 <td>Private method to fix the indentation of a closing bracket lines (E123).</td>
86 </tr><tr>
87 <td><a href="#Pep8Fixer.__fixE125">__fixE125</a></td>
88 <td>Private method to fix the indentation of continuation lines not distinguishable from next logical line (E125).</td>
89 </tr><tr>
90 <td><a href="#Pep8Fixer.__fixE126">__fixE126</a></td>
91 <td>Private method to fix over-indented/under-indented hanging indentation (E126, E133).</td>
92 </tr><tr>
93 <td><a href="#Pep8Fixer.__fixE127">__fixE127</a></td>
94 <td>Private method to fix over/under indented lines (E127, E128).</td>
95 </tr><tr>
72 <td><a href="#Pep8Fixer.__fixE201">__fixE201</a></td> 96 <td><a href="#Pep8Fixer.__fixE201">__fixE201</a></td>
73 <td>Private method to fix extraneous whitespace (E201, E202, E203, E211).</td> 97 <td>Private method to fix extraneous whitespace (E201, E202, E203, E211).</td>
74 </tr><tr> 98 </tr><tr>
75 <td><a href="#Pep8Fixer.__fixE221">__fixE221</a></td> 99 <td><a href="#Pep8Fixer.__fixE221">__fixE221</a></td>
76 <td>Private method to fix extraneous whitespace around operator or keyword (E221, E222, E223, E224, E225, E226, E227, E228, E241, E242, E271, E272, E273, E274).</td> 100 <td>Private method to fix extraneous whitespace around operator or keyword (E221, E222, E223, E224, E225, E226, E227, E228, E241, E242, E271, E272, E273, E274).</td>
109 <td>Private method to fix semicolon-separated compound statements (E702, E703).</td> 133 <td>Private method to fix semicolon-separated compound statements (E702, E703).</td>
110 </tr><tr> 134 </tr><tr>
111 <td><a href="#Pep8Fixer.__fixE711">__fixE711</a></td> 135 <td><a href="#Pep8Fixer.__fixE711">__fixE711</a></td>
112 <td>Private method to fix comparison with None (E711, E712).</td> 136 <td>Private method to fix comparison with None (E711, E712).</td>
113 </tr><tr> 137 </tr><tr>
138 <td><a href="#Pep8Fixer.__fixReindent">__fixReindent</a></td>
139 <td>Private method to fix a badly indented line.</td>
140 </tr><tr>
114 <td><a href="#Pep8Fixer.__fixW291">__fixW291</a></td> 141 <td><a href="#Pep8Fixer.__fixW291">__fixW291</a></td>
115 <td>Private method to fix trailing whitespace (W291, W293).</td> 142 <td>Private method to fix trailing whitespace (W291, W293).</td>
116 </tr><tr> 143 </tr><tr>
117 <td><a href="#Pep8Fixer.__fixW292">__fixW292</a></td> 144 <td><a href="#Pep8Fixer.__fixW292">__fixW292</a></td>
118 <td>Private method to fix a missing newline at the end of file (W292).</td> 145 <td>Private method to fix a missing newline at the end of file (W292).</td>
132 <td><a href="#Pep8Fixer.__getIndent">__getIndent</a></td> 159 <td><a href="#Pep8Fixer.__getIndent">__getIndent</a></td>
133 <td>Private method to get the indentation string.</td> 160 <td>Private method to get the indentation string.</td>
134 </tr><tr> 161 </tr><tr>
135 <td><a href="#Pep8Fixer.__getIndentWord">__getIndentWord</a></td> 162 <td><a href="#Pep8Fixer.__getIndentWord">__getIndentWord</a></td>
136 <td>Private method to determine the indentation type.</td> 163 <td>Private method to determine the indentation type.</td>
164 </tr><tr>
165 <td><a href="#Pep8Fixer.__getLogical">__getLogical</a></td>
166 <td>Private method to get the logical line corresponding to the given position.</td>
137 </tr><tr> 167 </tr><tr>
138 <td><a href="#Pep8Fixer.fixIssue">fixIssue</a></td> 168 <td><a href="#Pep8Fixer.fixIssue">fixIssue</a></td>
139 <td>Public method to fix the fixable issues.</td> 169 <td>Public method to fix the fixable issues.</td>
140 </tr><tr> 170 </tr><tr>
141 <td><a href="#Pep8Fixer.saveFile">saveFile</a></td> 171 <td><a href="#Pep8Fixer.saveFile">saveFile</a></td>
146 <table> 176 <table>
147 <tr><td>None</td></tr> 177 <tr><td>None</td></tr>
148 </table> 178 </table>
149 <a NAME="Pep8Fixer.__init__" ID="Pep8Fixer.__init__"></a> 179 <a NAME="Pep8Fixer.__init__" ID="Pep8Fixer.__init__"></a>
150 <h4>Pep8Fixer (Constructor)</h4> 180 <h4>Pep8Fixer (Constructor)</h4>
151 <b>Pep8Fixer</b>(<i>project, filename, sourceLines, fixCodes, inPlace</i>) 181 <b>Pep8Fixer</b>(<i>project, filename, sourceLines, fixCodes, noFixCodes, maxLineLength, inPlace</i>)
152 <p> 182 <p>
153 Constructor 183 Constructor
154 </p><dl> 184 </p><dl>
155 <dt><i>project</i></dt> 185 <dt><i>project</i></dt>
156 <dd> 186 <dd>
164 (list of string) 194 (list of string)
165 </dd><dt><i>fixCodes</i></dt> 195 </dd><dt><i>fixCodes</i></dt>
166 <dd> 196 <dd>
167 list of codes to be fixed as a comma separated 197 list of codes to be fixed as a comma separated
168 string (string) 198 string (string)
199 </dd><dt><i>noFixCodes</i></dt>
200 <dd>
201 list of codes not to be fixed as a comma
202 separated string (string)
203 </dd><dt><i>maxLineLength</i></dt>
204 <dd>
205 maximum allowed line length (integer)
169 </dd><dt><i>inPlace</i></dt> 206 </dd><dt><i>inPlace</i></dt>
170 <dd> 207 <dd>
171 flag indicating to modify the file in place (boolean) 208 flag indicating to modify the file in place (boolean)
172 </dd> 209 </dd>
173 </dl><a NAME="Pep8Fixer.__finalize" ID="Pep8Fixer.__finalize"></a> 210 </dl><a NAME="Pep8Fixer.__finalize" ID="Pep8Fixer.__finalize"></a>
174 <h4>Pep8Fixer.__finalize</h4> 211 <h4>Pep8Fixer.__finalize</h4>
175 <b>__finalize</b>(<i></i>) 212 <b>__finalize</b>(<i></i>)
176 <p> 213 <p>
177 Private method to apply all deferred fixes. 214 Private method to apply all deferred fixes.
178 </p><a NAME="Pep8Fixer.__fixE101" ID="Pep8Fixer.__fixE101"></a> 215 </p><a NAME="Pep8Fixer.__findLogical" ID="Pep8Fixer.__findLogical"></a>
216 <h4>Pep8Fixer.__findLogical</h4>
217 <b>__findLogical</b>(<i></i>)
218 <p>
219 Private method to extract the index of all the starts and ends of lines.
220 </p><dl>
221 <dt>Returns:</dt>
222 <dd>
223 tuple containing two lists of integer with start and end tuples
224 of lines
225 </dd>
226 </dl><a NAME="Pep8Fixer.__fixE101" ID="Pep8Fixer.__fixE101"></a>
179 <h4>Pep8Fixer.__fixE101</h4> 227 <h4>Pep8Fixer.__fixE101</h4>
180 <b>__fixE101</b>(<i>code, line, pos</i>) 228 <b>__fixE101</b>(<i>code, line, pos</i>)
181 <p> 229 <p>
182 Private method to fix obsolete tab usage and indentation errors 230 Private method to fix obsolete tab usage and indentation errors
183 (E101, E111, W191). 231 (E101, E111, W191).
189 <dd> 237 <dd>
190 line number of the issue (integer) 238 line number of the issue (integer)
191 </dd><dt><i>pos</i></dt> 239 </dd><dt><i>pos</i></dt>
192 <dd> 240 <dd>
193 position inside line (integer) 241 position inside line (integer)
242 </dd>
243 </dl><dl>
244 <dt>Returns:</dt>
245 <dd>
246 flag indicating an applied fix (boolean) and a message for
247 the fix (string)
248 </dd>
249 </dl><a NAME="Pep8Fixer.__fixE121" ID="Pep8Fixer.__fixE121"></a>
250 <h4>Pep8Fixer.__fixE121</h4>
251 <b>__fixE121</b>(<i>code, line, pos, apply=False</i>)
252 <p>
253 Private method to fix the indentation of continuation lines and
254 closing brackets (E121,E124).
255 </p><dl>
256 <dt><i>code</i></dt>
257 <dd>
258 code of the issue (string)
259 </dd><dt><i>line</i></dt>
260 <dd>
261 line number of the issue (integer)
262 </dd><dt><i>pos</i></dt>
263 <dd>
264 position inside line (integer)
265 </dd><dt><i>apply=</i></dt>
266 <dd>
267 flag indicating, that the fix should be applied
268 (boolean)
269 </dd>
270 </dl><dl>
271 <dt>Returns:</dt>
272 <dd>
273 flag indicating an applied fix (boolean) and a message for
274 the fix (string)
275 </dd>
276 </dl><a NAME="Pep8Fixer.__fixE122" ID="Pep8Fixer.__fixE122"></a>
277 <h4>Pep8Fixer.__fixE122</h4>
278 <b>__fixE122</b>(<i>code, line, pos, apply=False</i>)
279 <p>
280 Private method to fix a missing indentation of continuation lines (E122).
281 </p><dl>
282 <dt><i>code</i></dt>
283 <dd>
284 code of the issue (string)
285 </dd><dt><i>line</i></dt>
286 <dd>
287 line number of the issue (integer)
288 </dd><dt><i>pos</i></dt>
289 <dd>
290 position inside line (integer)
291 </dd><dt><i>apply=</i></dt>
292 <dd>
293 flag indicating, that the fix should be applied
294 (boolean)
295 </dd>
296 </dl><dl>
297 <dt>Returns:</dt>
298 <dd>
299 flag indicating an applied fix (boolean) and a message for
300 the fix (string)
301 </dd>
302 </dl><a NAME="Pep8Fixer.__fixE123" ID="Pep8Fixer.__fixE123"></a>
303 <h4>Pep8Fixer.__fixE123</h4>
304 <b>__fixE123</b>(<i>code, line, pos, apply=False</i>)
305 <p>
306 Private method to fix the indentation of a closing bracket lines (E123).
307 </p><dl>
308 <dt><i>code</i></dt>
309 <dd>
310 code of the issue (string)
311 </dd><dt><i>line</i></dt>
312 <dd>
313 line number of the issue (integer)
314 </dd><dt><i>pos</i></dt>
315 <dd>
316 position inside line (integer)
317 </dd><dt><i>apply=</i></dt>
318 <dd>
319 flag indicating, that the fix should be applied
320 (boolean)
321 </dd>
322 </dl><dl>
323 <dt>Returns:</dt>
324 <dd>
325 flag indicating an applied fix (boolean) and a message for
326 the fix (string)
327 </dd>
328 </dl><a NAME="Pep8Fixer.__fixE125" ID="Pep8Fixer.__fixE125"></a>
329 <h4>Pep8Fixer.__fixE125</h4>
330 <b>__fixE125</b>(<i>code, line, pos, apply=False</i>)
331 <p>
332 Private method to fix the indentation of continuation lines not
333 distinguishable from next logical line (E125).
334 </p><dl>
335 <dt><i>code</i></dt>
336 <dd>
337 code of the issue (string)
338 </dd><dt><i>line</i></dt>
339 <dd>
340 line number of the issue (integer)
341 </dd><dt><i>pos</i></dt>
342 <dd>
343 position inside line (integer)
344 </dd><dt><i>apply=</i></dt>
345 <dd>
346 flag indicating, that the fix should be applied
347 (boolean)
348 </dd>
349 </dl><dl>
350 <dt>Returns:</dt>
351 <dd>
352 flag indicating an applied fix (boolean) and a message for
353 the fix (string)
354 </dd>
355 </dl><a NAME="Pep8Fixer.__fixE126" ID="Pep8Fixer.__fixE126"></a>
356 <h4>Pep8Fixer.__fixE126</h4>
357 <b>__fixE126</b>(<i>code, line, pos, apply=False</i>)
358 <p>
359 Private method to fix over-indented/under-indented hanging
360 indentation (E126, E133).
361 </p><dl>
362 <dt><i>code</i></dt>
363 <dd>
364 code of the issue (string)
365 </dd><dt><i>line</i></dt>
366 <dd>
367 line number of the issue (integer)
368 </dd><dt><i>pos</i></dt>
369 <dd>
370 position inside line (integer)
371 </dd><dt><i>apply=</i></dt>
372 <dd>
373 flag indicating, that the fix should be applied
374 (boolean)
375 </dd>
376 </dl><dl>
377 <dt>Returns:</dt>
378 <dd>
379 flag indicating an applied fix (boolean) and a message for
380 the fix (string)
381 </dd>
382 </dl><a NAME="Pep8Fixer.__fixE127" ID="Pep8Fixer.__fixE127"></a>
383 <h4>Pep8Fixer.__fixE127</h4>
384 <b>__fixE127</b>(<i>code, line, pos, apply=False</i>)
385 <p>
386 Private method to fix over/under indented lines (E127, E128).
387 </p><dl>
388 <dt><i>code</i></dt>
389 <dd>
390 code of the issue (string)
391 </dd><dt><i>line</i></dt>
392 <dd>
393 line number of the issue (integer)
394 </dd><dt><i>pos</i></dt>
395 <dd>
396 position inside line (integer)
397 </dd><dt><i>apply=</i></dt>
398 <dd>
399 flag indicating, that the fix should be applied
400 (boolean)
194 </dd> 401 </dd>
195 </dl><dl> 402 </dl><dl>
196 <dt>Returns:</dt> 403 <dt>Returns:</dt>
197 <dd> 404 <dd>
198 flag indicating an applied fix (boolean) and a message for 405 flag indicating an applied fix (boolean) and a message for
342 </dl><a NAME="Pep8Fixer.__fixE302" ID="Pep8Fixer.__fixE302"></a> 549 </dl><a NAME="Pep8Fixer.__fixE302" ID="Pep8Fixer.__fixE302"></a>
343 <h4>Pep8Fixer.__fixE302</h4> 550 <h4>Pep8Fixer.__fixE302</h4>
344 <b>__fixE302</b>(<i>code, line, pos, apply=False</i>) 551 <b>__fixE302</b>(<i>code, line, pos, apply=False</i>)
345 <p> 552 <p>
346 Private method to fix the need for two blank lines (E302). 553 Private method to fix the need for two blank lines (E302).
347 </p><a NAME="Pep8Fixer.__fixE303" ID="Pep8Fixer.__fixE303"></a> 554 </p><dl>
555 <dt><i>code</i></dt>
556 <dd>
557 code of the issue (string)
558 </dd><dt><i>line</i></dt>
559 <dd>
560 line number of the issue (integer)
561 </dd><dt><i>pos</i></dt>
562 <dd>
563 position inside line (integer)
564 </dd><dt><i>apply=</i></dt>
565 <dd>
566 flag indicating, that the fix should be applied
567 (boolean)
568 </dd>
569 </dl><dl>
570 <dt>Returns:</dt>
571 <dd>
572 flag indicating an applied fix (boolean) and a message for
573 the fix (string)
574 </dd>
575 </dl><a NAME="Pep8Fixer.__fixE303" ID="Pep8Fixer.__fixE303"></a>
348 <h4>Pep8Fixer.__fixE303</h4> 576 <h4>Pep8Fixer.__fixE303</h4>
349 <b>__fixE303</b>(<i>code, line, pos, apply=False</i>) 577 <b>__fixE303</b>(<i>code, line, pos, apply=False</i>)
350 <p> 578 <p>
351 Private method to fix superfluous blank lines (E303). 579 Private method to fix superfluous blank lines (E303).
352 </p><dl> 580 </p><dl>
518 <dt>Returns:</dt> 746 <dt>Returns:</dt>
519 <dd> 747 <dd>
520 flag indicating an applied fix (boolean) and a message for 748 flag indicating an applied fix (boolean) and a message for
521 the fix (string) 749 the fix (string)
522 </dd> 750 </dd>
751 </dl><a NAME="Pep8Fixer.__fixReindent" ID="Pep8Fixer.__fixReindent"></a>
752 <h4>Pep8Fixer.__fixReindent</h4>
753 <b>__fixReindent</b>(<i>line, pos, logical</i>)
754 <p>
755 Private method to fix a badly indented line.
756 </p><p>
757 This is done by adding or removing from its initial indent only.
758 </p><dl>
759 <dt><i>line</i></dt>
760 <dd>
761 line number of the issue (integer)
762 </dd><dt><i>pos</i></dt>
763 <dd>
764 position inside line (integer)
765 </dd>
766 </dl><dl>
767 <dt>Returns:</dt>
768 <dd>
769 flag indicating a change was done (boolean)
770 </dd>
523 </dl><a NAME="Pep8Fixer.__fixW291" ID="Pep8Fixer.__fixW291"></a> 771 </dl><a NAME="Pep8Fixer.__fixW291" ID="Pep8Fixer.__fixW291"></a>
524 <h4>Pep8Fixer.__fixW291</h4> 772 <h4>Pep8Fixer.__fixW291</h4>
525 <b>__fixW291</b>(<i>code, line, pos</i>) 773 <b>__fixW291</b>(<i>code, line, pos</i>)
526 <p> 774 <p>
527 Private method to fix trailing whitespace (W291, W293). 775 Private method to fix trailing whitespace (W291, W293).
662 </p><dl> 910 </p><dl>
663 <dt>Returns:</dt> 911 <dt>Returns:</dt>
664 <dd> 912 <dd>
665 string to be used for an indentation (string) 913 string to be used for an indentation (string)
666 </dd> 914 </dd>
915 </dl><a NAME="Pep8Fixer.__getLogical" ID="Pep8Fixer.__getLogical"></a>
916 <h4>Pep8Fixer.__getLogical</h4>
917 <b>__getLogical</b>(<i>line, pos</i>)
918 <p>
919 Private method to get the logical line corresponding to the given
920 position.
921 </p><dl>
922 <dt><i>line</i></dt>
923 <dd>
924 line number of the issue (integer)
925 </dd><dt><i>pos</i></dt>
926 <dd>
927 position inside line (integer)
928 </dd>
929 </dl><dl>
930 <dt>Returns:</dt>
931 <dd>
932 tuple of a tuple of two integers giving the start of the
933 logical line, another tuple of two integers giving the end
934 of the logical line and a list of strings with the original
935 source lines
936 </dd>
667 </dl><a NAME="Pep8Fixer.fixIssue" ID="Pep8Fixer.fixIssue"></a> 937 </dl><a NAME="Pep8Fixer.fixIssue" ID="Pep8Fixer.fixIssue"></a>
668 <h4>Pep8Fixer.fixIssue</h4> 938 <h4>Pep8Fixer.fixIssue</h4>
669 <b>fixIssue</b>(<i>line, pos, message</i>) 939 <b>fixIssue</b>(<i>line, pos, message</i>)
670 <p> 940 <p>
671 Public method to fix the fixable issues. 941 Public method to fix the fixable issues.
698 </dd> 968 </dd>
699 </dl><dl> 969 </dl><dl>
700 <dt>Returns:</dt> 970 <dt>Returns:</dt>
701 <dd> 971 <dd>
702 flag indicating success (boolean) 972 flag indicating success (boolean)
973 </dd>
974 </dl>
975 <div align="right"><a href="#top">Up</a></div>
976 <hr /><hr />
977 <a NAME="Pep8IndentationWrapper" ID="Pep8IndentationWrapper"></a>
978 <h2>Pep8IndentationWrapper</h2>
979 <p>
980 Class used by fixers dealing with indentation.
981 </p><p>
982 Each instance operates on a single logical line.
983 </p>
984 <h3>Derived from</h3>
985 object
986 <h3>Class Attributes</h3>
987 <table>
988 <tr><td>SKIP_TOKENS</td></tr>
989 </table>
990 <h3>Class Methods</h3>
991 <table>
992 <tr><td>None</td></tr>
993 </table>
994 <h3>Methods</h3>
995 <table>
996 <tr>
997 <td><a href="#Pep8IndentationWrapper.__init__">Pep8IndentationWrapper</a></td>
998 <td>Constructor</td>
999 </tr><tr>
1000 <td><a href="#Pep8IndentationWrapper.__buildTokensLogical">__buildTokensLogical</a></td>
1001 <td>Private method to build a logical line from a list of tokens.</td>
1002 </tr><tr>
1003 <td><a href="#Pep8IndentationWrapper.pep8Expected">pep8Expected</a></td>
1004 <td>Public method to replicate logic in pep8.py, to know what level to indent things to.</td>
1005 </tr>
1006 </table>
1007 <h3>Static Methods</h3>
1008 <table>
1009 <tr><td>None</td></tr>
1010 </table>
1011 <a NAME="Pep8IndentationWrapper.__init__" ID="Pep8IndentationWrapper.__init__"></a>
1012 <h4>Pep8IndentationWrapper (Constructor)</h4>
1013 <b>Pep8IndentationWrapper</b>(<i>physical_lines</i>)
1014 <p>
1015 Constructor
1016 </p><dl>
1017 <dt><i>physical_lines</i></dt>
1018 <dd>
1019 list of physical lines to operate on
1020 (list of strings)
1021 </dd>
1022 </dl><a NAME="Pep8IndentationWrapper.__buildTokensLogical" ID="Pep8IndentationWrapper.__buildTokensLogical"></a>
1023 <h4>Pep8IndentationWrapper.__buildTokensLogical</h4>
1024 <b>__buildTokensLogical</b>(<i>tokens</i>)
1025 <p>
1026 Private method to build a logical line from a list of tokens.
1027 </p><dl>
1028 <dt><i>tokens</i></dt>
1029 <dd>
1030 list of tokens as generated by tokenize.generate_tokens
1031 </dd>
1032 </dl><dl>
1033 <dt>Returns:</dt>
1034 <dd>
1035 logical line (string)
1036 </dd>
1037 </dl><a NAME="Pep8IndentationWrapper.pep8Expected" ID="Pep8IndentationWrapper.pep8Expected"></a>
1038 <h4>Pep8IndentationWrapper.pep8Expected</h4>
1039 <b>pep8Expected</b>(<i></i>)
1040 <p>
1041 Public method to replicate logic in pep8.py, to know what level to
1042 indent things to.
1043 </p><dl>
1044 <dt>Returns:</dt>
1045 <dd>
1046 list of lists, where each list represents valid indent levels for
1047 the line in question, relative from the initial indent. However, the
1048 first entry is the indent level which was expected.
703 </dd> 1049 </dd>
704 </dl> 1050 </dl>
705 <div align="right"><a href="#top">Up</a></div> 1051 <div align="right"><a href="#top">Up</a></div>
706 <hr /><hr /> 1052 <hr /><hr />
707 <a NAME="Pep8Reindenter" ID="Pep8Reindenter"></a> 1053 <a NAME="Pep8Reindenter" ID="Pep8Reindenter"></a>

eric ide

mercurial