Documentation/Source/eric5.Plugins.CheckerPlugins.Tabnanny.Tabnanny.html

changeset 58
37f0444c3479
parent 21
b88a0e6268bd
child 409
0ea528e80202
--- a/Documentation/Source/eric5.Plugins.CheckerPlugins.Tabnanny.Tabnanny.html	Thu Jan 14 17:27:31 2010 +0000
+++ b/Documentation/Source/eric5.Plugins.CheckerPlugins.Tabnanny.Tabnanny.html	Thu Jan 14 18:35:52 2010 +0000
@@ -22,23 +22,23 @@
 <body><a NAME="top" ID="top"></a>
 <h1>eric5.Plugins.CheckerPlugins.Tabnanny.Tabnanny</h1>
 <p>
-&#84;&#104;&#101; &#84;&#97;&#98; &#78;&#97;&#110;&#110;y &#100;&#101;&#115;&#112;&#105;&#115;&#101;&#115; &#97;&#109;&#98;&#105;&#103;&#117;&#111;&#117;&#115; &#105;&#110;&#100;&#101;&#110;&#116;&#97;&#116;&#105;&#111;&#110;.  &#83;&#104;&#101; &#107;&#110;&#111;w&#115; &#110;&#111; &#109;&#101;&#114;&#99;y.
+The Tab Nanny despises ambiguous indentation.  She knows no mercy.
 </p><p>
-&#116;&#97;&#98;&#110;&#97;&#110;&#110;y -- &#68;&#101;&#116;&#101;&#99;&#116;&#105;&#111;&#110; &#111;&#102; &#97;&#109;&#98;&#105;&#103;&#117;&#111;&#117;&#115; &#105;&#110;&#100;&#101;&#110;&#116;&#97;&#116;&#105;&#111;&#110;
+tabnanny -- Detection of ambiguous indentation
 </p><p>
-&#70;&#111;&#114; &#116;&#104;&#101; &#116;&#105;&#109;&#101; &#98;&#101;&#105;&#110;&#103; &#116;&#104;&#105;&#115; &#109;&#111;&#100;&#117;&#108;&#101; &#105;&#115; &#105;&#110;&#116;&#101;&#110;&#100;&#101;&#100; &#116;&#111; &#98;&#101; &#99;&#97;&#108;&#108;&#101;&#100; &#97;&#115; &#97; &#115;&#99;&#114;&#105;&#112;&#116;.
-&#72;&#111;w&#101;v&#101;&#114; &#105;&#116; &#105;&#115; &#112;&#111;&#115;&#115;&#105;&#98;&#108;&#101; &#116;&#111; &#105;&#109;&#112;&#111;&#114;&#116; &#105;&#116; &#105;&#110;&#116;&#111; &#97;&#110; &#73;&#68;&#69; &#97;&#110;&#100; &#117;&#115;&#101; &#116;&#104;&#101; &#102;&#117;&#110;&#99;&#116;&#105;&#111;&#110;
-&#99;&#104;&#101;&#99;&#107;() &#100;&#101;&#115;&#99;&#114;&#105;&#98;&#101;&#100; &#98;&#101;&#108;&#111;w.
+For the time being this module is intended to be called as a script.
+However it is possible to import it into an IDE and use the function
+check() described below.
 </p><p>
-&#87;&#97;&#114;&#110;&#105;&#110;&#103;&#58; &#84;&#104;&#101; &#65;&#80;&#73; &#112;&#114;&#111;v&#105;&#100;&#101;&#100; &#98;y &#116;&#104;&#105;&#115; &#109;&#111;&#100;&#117;&#108;&#101; &#105;&#115; &#108;&#105;&#107;&#101;&#108;y &#116;&#111; &#99;&#104;&#97;&#110;&#103;&#101; &#105;&#110; &#102;&#117;&#116;&#117;&#114;&#101;
-&#114;&#101;&#108;&#101;&#97;&#115;&#101;&#115;&#59; &#115;&#117;&#99;&#104; &#99;&#104;&#97;&#110;&#103;&#101;&#115; &#109;&#97;y &#110;&#111;&#116; &#98;&#101; &#98;&#97;&#99;&#107;w&#97;&#114;&#100; &#99;&#111;&#109;&#112;&#97;&#116;&#105;&#98;&#108;&#101;.
+Warning: The API provided by this module is likely to change in future
+releases; such changes may not be backward compatible.
 </p><p>
-&#84;&#104;&#105;&#115; &#105;&#115; &#97; &#109;&#111;&#100;&#105;&#102;&#105;&#101;&#100; v&#101;&#114;&#115;&#105;&#111;&#110; &#116;&#111; &#109;&#97;&#107;&#101; &#116;&#104;&#101; &#111;&#114;&#105;&#103;&#105;&#110;&#97;&#108; &#116;&#97;&#98;&#110;&#97;&#110;&#110;y &#98;&#101;&#116;&#116;&#101;&#114; &#115;&#117;&#105;&#116;&#97;&#98;&#108;&#101;
-&#102;&#111;&#114; &#98;&#101;&#105;&#110;&#103; &#99;&#97;&#108;&#108;&#101;&#100; &#102;&#114;&#111;&#109; w&#105;&#116;&#104;&#105;&#110; &#116;&#104;&#101; &#101;&#114;&#105;&#99;&#53; &#73;&#68;&#69;.
+This is a modified version to make the original tabnanny better suitable
+for being called from within the eric5 IDE.
 </p><dl>
 <dt>Raises <b>ValueError</b>:</dt>
 <dd>
-&#84;&#104;&#101; &#116;&#111;&#107;&#101;&#110;&#105;z&#101; &#109;&#111;&#100;&#117;&#108;&#101; &#105;&#115; &#116;&#111;&#111; &#111;&#108;&#100;.
+The tokenize module is too old.
 </dd>
 </dl>
 <h3>Global Attributes</h3>
@@ -49,31 +49,31 @@
 <table>
 <tr>
 <td><a href="#NannyNag">NannyNag</a></td>
-<td>&#82;&#97;&#105;&#115;&#101;&#100; &#98;y &#116;&#111;&#107;&#101;&#110;&#101;&#97;&#116;&#101;&#114;() &#105;&#102; &#100;&#101;&#116;&#101;&#99;&#116;&#105;&#110;&#103; &#97;&#110; &#97;&#109;&#98;&#105;&#103;&#117;&#111;&#117;&#115; &#105;&#110;&#100;&#101;&#110;&#116;.</td>
+<td>Raised by tokeneater() if detecting an ambiguous indent.</td>
 </tr><tr>
 <td><a href="#Whitespace">Whitespace</a></td>
-<td>&#67;&#108;&#97;&#115;&#115; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#116;&#104;&#101; w&#104;&#105;&#116;&#101;&#115;&#112;&#97;&#99;&#101; &#99;&#104;&#101;&#99;&#107;&#101;&#114;.</td>
+<td>Class implementing the whitespace checker.</td>
 </tr>
 </table>
 <h3>Functions</h3>
 <table>
 <tr>
 <td><a href="#check">check</a></td>
-<td>&#80;&#114;&#105;v&#97;&#116;&#101; &#102;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#116;&#111; &#99;&#104;&#101;&#99;&#107; &#111;&#110;&#101; &#80;y&#116;&#104;&#111;&#110; &#115;&#111;&#117;&#114;&#99;&#101; &#102;&#105;&#108;&#101; &#102;&#111;&#114; w&#104;&#105;&#116;&#101;&#115;&#112;&#97;&#99;&#101; &#114;&#101;&#108;&#97;&#116;&#101;&#100; &#112;&#114;&#111;&#98;&#108;&#101;&#109;&#115;.</td>
+<td>Private function to check one Python source file for whitespace related problems.</td>
 </tr><tr>
 <td><a href="#format_witnesses">format_witnesses</a></td>
-<td>&#70;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#116;&#111; &#102;&#111;&#114;&#109;&#97;&#116; &#116;&#104;&#101; w&#105;&#116;&#110;&#101;&#115;&#115;&#101;&#115; &#97;&#115; &#97; &#114;&#101;&#97;&#100;&#97;&#98;&#108;&#101; &#115;&#116;&#114;&#105;&#110;&#103;.</td>
+<td>Function to format the witnesses as a readable string.</td>
 </tr><tr>
 <td><a href="#process_tokens">process_tokens</a></td>
-<td>&#70;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#112;&#114;&#111;&#99;&#101;&#115;&#115;&#105;&#110;&#103; &#97;&#108;&#108; &#116;&#111;&#107;&#101;&#110;&#115; &#103;&#101;&#110;&#101;&#114;&#97;&#116;&#101;&#100; &#98;y &#97; &#116;&#111;&#107;&#101;&#110;&#105;z&#101;&#114; &#114;&#117;&#110;.</td>
+<td>Function processing all tokens generated by a tokenizer run.</td>
 </tr>
 </table>
 <hr /><hr />
 <a NAME="NannyNag" ID="NannyNag"></a>
 <h2>NannyNag</h2>
 <p>
-    &#82;&#97;&#105;&#115;&#101;&#100; &#98;y &#116;&#111;&#107;&#101;&#110;&#101;&#97;&#116;&#101;&#114;() &#105;&#102; &#100;&#101;&#116;&#101;&#99;&#116;&#105;&#110;&#103; &#97;&#110; &#97;&#109;&#98;&#105;&#103;&#117;&#111;&#117;&#115; &#105;&#110;&#100;&#101;&#110;&#116;.
-    &#67;&#97;&#112;&#116;&#117;&#114;&#101;&#100; &#97;&#110;&#100; &#104;&#97;&#110;&#100;&#108;&#101;&#100; &#105;&#110; &#99;&#104;&#101;&#99;&#107;().
+    Raised by tokeneater() if detecting an ambiguous indent.
+    Captured and handled in check().
 </p>
 <h3>Derived from</h3>
 Exception
@@ -85,63 +85,63 @@
 <table>
 <tr>
 <td><a href="#NannyNag.__init__">NannyNag</a></td>
-<td>&#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114;</td>
+<td>Constructor</td>
 </tr><tr>
 <td><a href="#NannyNag.get_line">get_line</a></td>
-<td>&#77;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#116;&#114;&#105;&#101;v&#101; &#116;&#104;&#101; &#111;&#102;&#102;&#101;&#110;&#100;&#105;&#110;&#103; &#108;&#105;&#110;&#101;.</td>
+<td>Method to retrieve the offending line.</td>
 </tr><tr>
 <td><a href="#NannyNag.get_lineno">get_lineno</a></td>
-<td>&#77;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#116;&#114;&#105;&#101;v&#101; &#116;&#104;&#101; &#108;&#105;&#110;&#101; &#110;&#117;&#109;&#98;&#101;&#114;.</td>
+<td>Method to retrieve the line number.</td>
 </tr><tr>
 <td><a href="#NannyNag.get_msg">get_msg</a></td>
-<td>&#77;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#116;&#114;&#105;&#101;v&#101; &#116;&#104;&#101; &#109;&#101;&#115;&#115;&#97;&#103;&#101;.</td>
+<td>Method to retrieve the message.</td>
 </tr>
 </table>
 <a NAME="NannyNag.__init__" ID="NannyNag.__init__"></a>
 <h4>NannyNag (Constructor)</h4>
 <b>NannyNag</b>(<i>lineno, msg, line</i>)
 <p>
-        &#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114;
+        Constructor
 </p><dl>
 <dt><i>lineno</i></dt>
 <dd>
-&#76;&#105;&#110;&#101; &#110;&#117;&#109;&#98;&#101;&#114; &#111;&#102; &#116;&#104;&#101; &#97;&#109;&#98;&#105;&#103;&#117;&#111;&#117;&#115; &#105;&#110;&#100;&#101;&#110;&#116;.
+Line number of the ambiguous indent.
 </dd><dt><i>msg</i></dt>
 <dd>
-&#68;&#101;&#115;&#99;&#114;&#105;&#112;&#116;&#105;v&#101; &#109;&#101;&#115;&#115;&#97;&#103;&#101; &#97;&#115;&#115;&#105;&#103;&#110;&#101;&#100; &#116;&#111; &#116;&#104;&#105;&#115; &#112;&#114;&#111;&#98;&#108;&#101;&#109;.
+Descriptive message assigned to this problem.
 </dd><dt><i>line</i></dt>
 <dd>
-&#84;&#104;&#101; &#111;&#102;&#102;&#101;&#110;&#100;&#105;&#110;&#103; &#115;&#111;&#117;&#114;&#99;&#101; &#108;&#105;&#110;&#101;.
+The offending source line.
 </dd>
 </dl><a NAME="NannyNag.get_line" ID="NannyNag.get_line"></a>
 <h4>NannyNag.get_line</h4>
 <b>get_line</b>(<i></i>)
 <p>
-        &#77;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#116;&#114;&#105;&#101;v&#101; &#116;&#104;&#101; &#111;&#102;&#102;&#101;&#110;&#100;&#105;&#110;&#103; &#108;&#105;&#110;&#101;.
+        Method to retrieve the offending line.
 </p><dl>
 <dt>Returns:</dt>
 <dd>
-&#84;&#104;&#101; &#108;&#105;&#110;&#101; &#111;&#102; &#99;&#111;&#100;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+The line of code (string)
 </dd>
 </dl><a NAME="NannyNag.get_lineno" ID="NannyNag.get_lineno"></a>
 <h4>NannyNag.get_lineno</h4>
 <b>get_lineno</b>(<i></i>)
 <p>
-        &#77;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#116;&#114;&#105;&#101;v&#101; &#116;&#104;&#101; &#108;&#105;&#110;&#101; &#110;&#117;&#109;&#98;&#101;&#114;.
+        Method to retrieve the line number.
 </p><dl>
 <dt>Returns:</dt>
 <dd>
-&#84;&#104;&#101; &#108;&#105;&#110;&#101; &#110;&#117;&#109;&#98;&#101;&#114; (&#105;&#110;&#116;&#101;&#103;&#101;&#114;)
+The line number (integer)
 </dd>
 </dl><a NAME="NannyNag.get_msg" ID="NannyNag.get_msg"></a>
 <h4>NannyNag.get_msg</h4>
 <b>get_msg</b>(<i></i>)
 <p>
-        &#77;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#116;&#114;&#105;&#101;v&#101; &#116;&#104;&#101; &#109;&#101;&#115;&#115;&#97;&#103;&#101;.
+        Method to retrieve the message.
 </p><dl>
 <dt>Returns:</dt>
 <dd>
-&#84;&#104;&#101; &#101;&#114;&#114;&#111;&#114; &#109;&#101;&#115;&#115;&#97;&#103;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+The error message (string)
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>
@@ -149,7 +149,7 @@
 <a NAME="Whitespace" ID="Whitespace"></a>
 <h2>Whitespace</h2>
 <p>
-    &#67;&#108;&#97;&#115;&#115; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#116;&#104;&#101; w&#104;&#105;&#116;&#101;&#115;&#112;&#97;&#99;&#101; &#99;&#104;&#101;&#99;&#107;&#101;&#114;.
+    Class implementing the whitespace checker.
 </p>
 <h3>Derived from</h3>
 object
@@ -161,131 +161,131 @@
 <table>
 <tr>
 <td><a href="#Whitespace.__init__">Whitespace</a></td>
-<td>&#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114;</td>
+<td>Constructor</td>
 </tr><tr>
 <td><a href="#Whitespace.equal">equal</a></td>
-<td>&#77;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#111;&#109;&#112;&#97;&#114;&#101; &#116;&#104;&#101; &#105;&#110;&#100;&#101;&#110;&#116;&#97;&#116;&#105;&#111;&#110; &#108;&#101;v&#101;&#108;&#115; &#111;&#102; &#116;w&#111; &#87;&#104;&#105;&#116;&#101;&#115;&#112;&#97;&#99;&#101; &#111;&#98;&#106;&#101;&#99;&#116;&#115; &#102;&#111;&#114; &#101;&#113;&#117;&#97;&#108;&#105;&#116;y.</td>
+<td>Method to compare the indentation levels of two Whitespace objects for equality.</td>
 </tr><tr>
 <td><a href="#Whitespace.indent_level">indent_level</a></td>
-<td>&#77;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#100;&#101;&#116;&#101;&#114;&#109;&#105;&#110;&#101; &#116;&#104;&#101; &#105;&#110;&#100;&#101;&#110;&#116;&#97;&#116;&#105;&#111;&#110; &#108;&#101;v&#101;&#108;.</td>
+<td>Method to determine the indentation level.</td>
 </tr><tr>
 <td><a href="#Whitespace.less">less</a></td>
-<td>&#77;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#111;&#109;&#112;&#97;&#114;&#101; &#116;&#104;&#101; &#105;&#110;&#100;&#101;&#110;&#116;&#97;&#116;&#105;&#111;&#110; &#108;&#101;v&#101;&#108; &#97;&#103;&#97;&#105;&#110;&#115;&#116; &#97;&#110;&#111;&#116;&#104;&#101;&#114; &#87;&#104;&#105;&#116;&#101;&#115;&#112;&#97;&#99;&#101; &#111;&#98;&#106;&#101;&#99;&#116;&#115; &#116;&#111; &#98;&#101; &#115;&#109;&#97;&#108;&#108;&#101;&#114;.</td>
+<td>Method to compare the indentation level against another Whitespace objects to be smaller.</td>
 </tr><tr>
 <td><a href="#Whitespace.longest_run_of_spaces">longest_run_of_spaces</a></td>
-<td>&#77;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#97;&#108;&#99;&#117;&#108;&#97;&#116;&#101; &#116;&#104;&#101; &#108;&#101;&#110;&#103;&#116;&#104; &#111;&#102; &#108;&#111;&#110;&#103;&#101;&#115;&#116; &#99;&#111;&#110;&#116;&#105;&#103;&#117;&#111;&#117;&#115; &#114;&#117;&#110; &#111;&#102; &#115;&#112;&#97;&#99;&#101;&#115;.</td>
+<td>Method to calculate the length of longest contiguous run of spaces.</td>
 </tr><tr>
 <td><a href="#Whitespace.not_equal_witness">not_equal_witness</a></td>
-<td>&#77;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#97;&#108;&#99;&#117;&#108;&#97;&#116;&#101; &#97; &#116;&#117;&#112;&#108;&#101; &#111;&#102; w&#105;&#116;&#110;&#101;&#115;&#115;&#105;&#110;&#103; &#116;&#97;&#98; &#115;&#105;z&#101;.</td>
+<td>Method to calculate a tuple of witnessing tab size.</td>
 </tr><tr>
 <td><a href="#Whitespace.not_less_witness">not_less_witness</a></td>
-<td>&#77;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#97;&#108;&#99;&#117;&#108;&#97;&#116;&#101; &#97; &#116;&#117;&#112;&#108;&#101; &#111;&#102; w&#105;&#116;&#110;&#101;&#115;&#115;&#105;&#110;&#103; &#116;&#97;&#98; &#115;&#105;z&#101;.</td>
+<td>Method to calculate a tuple of witnessing tab size.</td>
 </tr>
 </table>
 <a NAME="Whitespace.__init__" ID="Whitespace.__init__"></a>
 <h4>Whitespace (Constructor)</h4>
 <b>Whitespace</b>(<i>ws</i>)
 <p>
-        &#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114;
+        Constructor
 </p><dl>
 <dt><i>ws</i></dt>
 <dd>
-&#84;&#104;&#101; &#115;&#116;&#114;&#105;&#110;&#103; &#116;&#111; &#98;&#101; &#99;&#104;&#101;&#99;&#107;&#101;&#100;.
+The string to be checked.
 </dd>
 </dl><a NAME="Whitespace.equal" ID="Whitespace.equal"></a>
 <h4>Whitespace.equal</h4>
 <b>equal</b>(<i>other</i>)
 <p>
-        &#77;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#111;&#109;&#112;&#97;&#114;&#101; &#116;&#104;&#101; &#105;&#110;&#100;&#101;&#110;&#116;&#97;&#116;&#105;&#111;&#110; &#108;&#101;v&#101;&#108;&#115; &#111;&#102; &#116;w&#111; &#87;&#104;&#105;&#116;&#101;&#115;&#112;&#97;&#99;&#101; &#111;&#98;&#106;&#101;&#99;&#116;&#115; &#102;&#111;&#114; &#101;&#113;&#117;&#97;&#108;&#105;&#116;y.
+        Method to compare the indentation levels of two Whitespace objects for equality.
 </p><dl>
 <dt><i>other</i></dt>
 <dd>
-&#87;&#104;&#105;&#116;&#101;&#115;&#112;&#97;&#99;&#101; &#111;&#98;&#106;&#101;&#99;&#116; &#116;&#111; &#99;&#111;&#109;&#112;&#97;&#114;&#101; &#97;&#103;&#97;&#105;&#110;&#115;&#116;.
+Whitespace object to compare against.
 </dd>
 </dl><dl>
 <dt>Returns:</dt>
 <dd>
-&#84;&#114;&#117;&#101;, &#105;&#102; w&#101; &#99;&#111;&#109;&#112;&#97;&#114;&#101; &#101;&#113;&#117;&#97;&#108; &#97;&#103;&#97;&#105;&#110;&#115;&#116; &#116;&#104;&#101; &#111;&#116;&#104;&#101;&#114; &#87;&#104;&#105;&#116;&#101;&#115;&#112;&#97;&#99;&#101; &#111;&#98;&#106;&#101;&#99;&#116;.
+True, if we compare equal against the other Whitespace object.
 </dd>
 </dl><a NAME="Whitespace.indent_level" ID="Whitespace.indent_level"></a>
 <h4>Whitespace.indent_level</h4>
 <b>indent_level</b>(<i>tabsize</i>)
 <p>
-        &#77;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#100;&#101;&#116;&#101;&#114;&#109;&#105;&#110;&#101; &#116;&#104;&#101; &#105;&#110;&#100;&#101;&#110;&#116;&#97;&#116;&#105;&#111;&#110; &#108;&#101;v&#101;&#108;.
+        Method to determine the indentation level.
 </p><dl>
 <dt><i>tabsize</i></dt>
 <dd>
-&#84;&#104;&#101; &#108;&#101;&#110;&#103;&#116;&#104; &#111;&#102; &#97; &#116;&#97;&#98; &#115;&#116;&#111;&#112;. (&#105;&#110;&#116;&#101;&#103;&#101;&#114;)
+The length of a tab stop. (integer)
 </dd>
 </dl><dl>
 <dt>Returns:</dt>
 <dd>
-&#105;&#110;&#100;&#101;&#110;&#116;&#97;&#116;&#105;&#111;&#110; &#108;&#101;v&#101;&#108; (&#105;&#110;&#116;&#101;&#103;&#101;&#114;)
+indentation level (integer)
 </dd>
 </dl><a NAME="Whitespace.less" ID="Whitespace.less"></a>
 <h4>Whitespace.less</h4>
 <b>less</b>(<i>other</i>)
 <p>
-        &#77;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#111;&#109;&#112;&#97;&#114;&#101; &#116;&#104;&#101; &#105;&#110;&#100;&#101;&#110;&#116;&#97;&#116;&#105;&#111;&#110; &#108;&#101;v&#101;&#108; &#97;&#103;&#97;&#105;&#110;&#115;&#116; &#97;&#110;&#111;&#116;&#104;&#101;&#114; &#87;&#104;&#105;&#116;&#101;&#115;&#112;&#97;&#99;&#101; &#111;&#98;&#106;&#101;&#99;&#116;&#115; &#116;&#111; 
-        &#98;&#101; &#115;&#109;&#97;&#108;&#108;&#101;&#114;.
+        Method to compare the indentation level against another Whitespace objects to 
+        be smaller.
 </p><dl>
 <dt><i>other</i></dt>
 <dd>
-&#87;&#104;&#105;&#116;&#101;&#115;&#112;&#97;&#99;&#101; &#111;&#98;&#106;&#101;&#99;&#116; &#116;&#111; &#99;&#111;&#109;&#112;&#97;&#114;&#101; &#97;&#103;&#97;&#105;&#110;&#115;&#116;.
+Whitespace object to compare against.
 </dd>
 </dl><dl>
 <dt>Returns:</dt>
 <dd>
-&#84;&#114;&#117;&#101;, &#105;&#102; w&#101; &#99;&#111;&#109;&#112;&#97;&#114;&#101; &#108;&#101;&#115;&#115; &#97;&#103;&#97;&#105;&#110;&#115;&#116; &#116;&#104;&#101; &#111;&#116;&#104;&#101;&#114; &#87;&#104;&#105;&#116;&#101;&#115;&#112;&#97;&#99;&#101; &#111;&#98;&#106;&#101;&#99;&#116;.
+True, if we compare less against the other Whitespace object.
 </dd>
 </dl><a NAME="Whitespace.longest_run_of_spaces" ID="Whitespace.longest_run_of_spaces"></a>
 <h4>Whitespace.longest_run_of_spaces</h4>
 <b>longest_run_of_spaces</b>(<i></i>)
 <p>
-        &#77;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#97;&#108;&#99;&#117;&#108;&#97;&#116;&#101; &#116;&#104;&#101; &#108;&#101;&#110;&#103;&#116;&#104; &#111;&#102; &#108;&#111;&#110;&#103;&#101;&#115;&#116; &#99;&#111;&#110;&#116;&#105;&#103;&#117;&#111;&#117;&#115; &#114;&#117;&#110; &#111;&#102; &#115;&#112;&#97;&#99;&#101;&#115;.
+        Method to calculate the length of longest contiguous run of spaces.
 </p><dl>
 <dt>Returns:</dt>
 <dd>
-&#84;&#104;&#101; &#108;&#101;&#110;&#103;&#116;&#104; &#111;&#102; &#108;&#111;&#110;&#103;&#101;&#115;&#116; &#99;&#111;&#110;&#116;&#105;&#103;&#117;&#111;&#117;&#115; &#114;&#117;&#110; &#111;&#102; &#115;&#112;&#97;&#99;&#101;&#115; (w&#104;&#101;&#116;&#104;&#101;&#114; &#111;&#114; &#110;&#111;&#116;
-            &#112;&#114;&#101;&#99;&#101;&#100;&#105;&#110;&#103; &#97; &#116;&#97;&#98;)
+The length of longest contiguous run of spaces (whether or not
+            preceding a tab)
 </dd>
 </dl><a NAME="Whitespace.not_equal_witness" ID="Whitespace.not_equal_witness"></a>
 <h4>Whitespace.not_equal_witness</h4>
 <b>not_equal_witness</b>(<i>other</i>)
 <p>
-        &#77;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#97;&#108;&#99;&#117;&#108;&#97;&#116;&#101; &#97; &#116;&#117;&#112;&#108;&#101; &#111;&#102; w&#105;&#116;&#110;&#101;&#115;&#115;&#105;&#110;&#103; &#116;&#97;&#98; &#115;&#105;z&#101;.
+        Method to calculate a tuple of witnessing tab size.
 </p><p>
-        &#73;&#110;&#116;&#101;&#110;&#100;&#101;&#100; &#116;&#111; &#98;&#101; &#117;&#115;&#101;&#100; &#97;&#102;&#116;&#101;&#114; &#110;&#111;&#116; &#115;&#101;&#108;&#102;.&#101;&#113;&#117;&#97;&#108;(&#111;&#116;&#104;&#101;&#114;) &#105;&#115; &#107;&#110;&#111;w&#110;, &#105;&#110; w&#104;&#105;&#99;&#104;
-        &#99;&#97;&#115;&#101; &#105;&#116; w&#105;&#108;&#108; &#114;&#101;&#116;&#117;&#114;&#110; &#97;&#116; &#108;&#101;&#97;&#115;&#116; &#111;&#110;&#101; w&#105;&#116;&#110;&#101;&#115;&#115;&#105;&#110;&#103; &#116;&#97;&#98; &#115;&#105;z&#101;.
+        Intended to be used after not self.equal(other) is known, in which
+        case it will return at least one witnessing tab size.
 </p><dl>
 <dt><i>other</i></dt>
 <dd>
-&#87;&#104;&#105;&#116;&#101;&#115;&#112;&#97;&#99;&#101; &#111;&#98;&#106;&#101;&#99;&#116; &#116;&#111; &#99;&#97;&#108;&#99;&#117;&#108;&#97;&#116;&#101; &#97;&#103;&#97;&#105;&#110;&#115;&#116;.
+Whitespace object to calculate against.
 </dd>
 </dl><dl>
 <dt>Returns:</dt>
 <dd>
-&#65; &#108;&#105;&#115;&#116; &#111;&#102; &#116;&#117;&#112;&#108;&#101;&#115; (&#116;&#115;, &#105;&#49;, &#105;&#50;) &#115;&#117;&#99;&#104; &#116;&#104;&#97;&#116;
-            &#105;&#49; &#61;&#61; &#115;&#101;&#108;&#102;.&#105;&#110;&#100;&#101;&#110;&#116;&#95;&#108;&#101;v&#101;&#108;(&#116;&#115;) !&#61; &#111;&#116;&#104;&#101;&#114;.&#105;&#110;&#100;&#101;&#110;&#116;&#95;&#108;&#101;v&#101;&#108;(&#116;&#115;) &#61;&#61; &#105;&#50;.
+A list of tuples (ts, i1, i2) such that
+            i1 == self.indent_level(ts) != other.indent_level(ts) == i2.
 </dd>
 </dl><a NAME="Whitespace.not_less_witness" ID="Whitespace.not_less_witness"></a>
 <h4>Whitespace.not_less_witness</h4>
 <b>not_less_witness</b>(<i>other</i>)
 <p>
-        &#77;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#97;&#108;&#99;&#117;&#108;&#97;&#116;&#101; &#97; &#116;&#117;&#112;&#108;&#101; &#111;&#102; w&#105;&#116;&#110;&#101;&#115;&#115;&#105;&#110;&#103; &#116;&#97;&#98; &#115;&#105;z&#101;.
+        Method to calculate a tuple of witnessing tab size.
 </p><p>
-        &#73;&#110;&#116;&#101;&#110;&#100;&#101;&#100; &#116;&#111; &#98;&#101; &#117;&#115;&#101;&#100; &#97;&#102;&#116;&#101;&#114; &#110;&#111;&#116; &#115;&#101;&#108;&#102;.&#108;&#101;&#115;&#115;(&#111;&#116;&#104;&#101;&#114; &#105;&#115; &#107;&#110;&#111;w&#110;, &#105;&#110; w&#104;&#105;&#99;&#104;
-        &#99;&#97;&#115;&#101; &#105;&#116; w&#105;&#108;&#108; &#114;&#101;&#116;&#117;&#114;&#110; &#97;&#116; &#108;&#101;&#97;&#115;&#116; &#111;&#110;&#101; w&#105;&#116;&#110;&#101;&#115;&#115;&#105;&#110;&#103; &#116;&#97;&#98; &#115;&#105;z&#101;.
+        Intended to be used after not self.less(other is known, in which
+        case it will return at least one witnessing tab size.
 </p><dl>
 <dt><i>other</i></dt>
 <dd>
-&#87;&#104;&#105;&#116;&#101;&#115;&#112;&#97;&#99;&#101; &#111;&#98;&#106;&#101;&#99;&#116; &#116;&#111; &#99;&#97;&#108;&#99;&#117;&#108;&#97;&#116;&#101; &#97;&#103;&#97;&#105;&#110;&#115;&#116;.
+Whitespace object to calculate against.
 </dd>
 </dl><dl>
 <dt>Returns:</dt>
 <dd>
-&#65; &#108;&#105;&#115;&#116; &#111;&#102; &#116;&#117;&#112;&#108;&#101;&#115; (&#116;&#115;, &#105;&#49;, &#105;&#50;) &#115;&#117;&#99;&#104; &#116;&#104;&#97;&#116;
-            &#105;&#49; &#61;&#61; &#115;&#101;&#108;&#102;.&#105;&#110;&#100;&#101;&#110;&#116;&#95;&#108;&#101;v&#101;&#108;(&#116;&#115;) &#62;&#61; &#111;&#116;&#104;&#101;&#114;.&#105;&#110;&#100;&#101;&#110;&#116;&#95;&#108;&#101;v&#101;&#108;(&#116;&#115;) &#61;&#61; &#105;&#50;.
+A list of tuples (ts, i1, i2) such that
+            i1 == self.indent_level(ts) >= other.indent_level(ts) == i2.
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>
@@ -294,19 +294,19 @@
 <h2>check</h2>
 <b>check</b>(<i>file</i>)
 <p>
-    &#80;&#114;&#105;v&#97;&#116;&#101; &#102;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#116;&#111; &#99;&#104;&#101;&#99;&#107; &#111;&#110;&#101; &#80;y&#116;&#104;&#111;&#110; &#115;&#111;&#117;&#114;&#99;&#101; &#102;&#105;&#108;&#101; &#102;&#111;&#114; w&#104;&#105;&#116;&#101;&#115;&#112;&#97;&#99;&#101; &#114;&#101;&#108;&#97;&#116;&#101;&#100; &#112;&#114;&#111;&#98;&#108;&#101;&#109;&#115;.
+    Private function to check one Python source file for whitespace related problems.
 </p><dl>
 <dt><i>file</i></dt>
 <dd>
-&#115;&#111;&#117;&#114;&#99;&#101; &#102;&#105;&#108;&#101;&#110;&#97;&#109;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+source filename (string)
 </dd>
 </dl><dl>
 <dt>Returns:</dt>
 <dd>
-&#65; &#116;&#117;&#112;&#108;&#101; &#105;&#110;&#100;&#105;&#99;&#97;&#116;&#105;&#110;&#103; &#115;&#116;&#97;&#116;&#117;&#115; (&#84;&#114;&#117;&#101; &#61; &#97;&#110; &#101;&#114;&#114;&#111;&#114; w&#97;&#115; &#102;&#111;&#117;&#110;&#100;), &#116;&#104;&#101;
-        &#102;&#105;&#108;&#101;&#110;&#97;&#109;&#101;, &#116;&#104;&#101; &#108;&#105;&#110;&#101;&#110;&#117;&#109;&#98;&#101;&#114; &#97;&#110;&#100; &#116;&#104;&#101; &#101;&#114;&#114;&#111;&#114; &#109;&#101;&#115;&#115;&#97;&#103;&#101;
-        (&#98;&#111;&#111;&#108;&#101;&#97;&#110;, &#115;&#116;&#114;&#105;&#110;&#103;, &#115;&#116;&#114;&#105;&#110;&#103;, &#115;&#116;&#114;&#105;&#110;&#103;). &#84;&#104;&#101; v&#97;&#108;&#117;&#101;&#115; &#97;&#114;&#101; &#111;&#110;&#108;y
-        v&#97;&#108;&#105;&#100;, &#105;&#102; &#116;&#104;&#101; &#115;&#116;&#97;&#116;&#117;&#115; &#105;&#115; &#84;&#114;&#117;&#101;.
+A tuple indicating status (True = an error was found), the
+        filename, the linenumber and the error message
+        (boolean, string, string, string). The values are only
+        valid, if the status is True.
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>
@@ -315,16 +315,16 @@
 <h2>format_witnesses</h2>
 <b>format_witnesses</b>(<i>w</i>)
 <p>
-    &#70;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#116;&#111; &#102;&#111;&#114;&#109;&#97;&#116; &#116;&#104;&#101; w&#105;&#116;&#110;&#101;&#115;&#115;&#101;&#115; &#97;&#115; &#97; &#114;&#101;&#97;&#100;&#97;&#98;&#108;&#101; &#115;&#116;&#114;&#105;&#110;&#103;.
+    Function to format the witnesses as a readable string.
 </p><dl>
 <dt><i>w</i></dt>
 <dd>
-&#65; &#108;&#105;&#115;&#116; &#111;&#102; w&#105;&#116;&#110;&#101;&#115;&#115;&#101;&#115;
+A list of witnesses
 </dd>
 </dl><dl>
 <dt>Returns:</dt>
 <dd>
-&#65; &#102;&#111;&#114;&#109;&#97;&#116;&#101;&#100; &#115;&#116;&#114;&#105;&#110;&#103; &#111;&#102; &#116;&#104;&#101; w&#105;&#116;&#110;&#101;&#115;&#115;&#101;&#115;.
+A formated string of the witnesses.
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>
@@ -333,11 +333,11 @@
 <h2>process_tokens</h2>
 <b>process_tokens</b>(<i>tokens</i>)
 <p>
-    &#70;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#112;&#114;&#111;&#99;&#101;&#115;&#115;&#105;&#110;&#103; &#97;&#108;&#108; &#116;&#111;&#107;&#101;&#110;&#115; &#103;&#101;&#110;&#101;&#114;&#97;&#116;&#101;&#100; &#98;y &#97; &#116;&#111;&#107;&#101;&#110;&#105;z&#101;&#114; &#114;&#117;&#110;.
+    Function processing all tokens generated by a tokenizer run.
 </p><dl>
 <dt><i>tokens</i></dt>
 <dd>
-&#108;&#105;&#115;&#116; &#111;&#102; &#116;&#111;&#107;&#101;&#110;&#115;
+list of tokens
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>

eric ide

mercurial