--- 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> -The Tab Nanny despises ambiguous indentation. She knows no mercy. +The Tab Nanny despises ambiguous indentation. She knows no mercy. </p><p> -tabnanny -- Detection of ambiguous indentation +tabnanny -- Detection of ambiguous indentation </p><p> -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. +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> -Warning: The API provided by this module is likely to change in future -releases; such changes may not be backward compatible. +Warning: The API provided by this module is likely to change in future +releases; such changes may not be backward compatible. </p><p> -This is a modified version to make the original tabnanny better suitable -for being called from within the eric5 IDE. +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> -The tokenize module is too old. +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>Raised by tokeneater() if detecting an ambiguous indent.</td> +<td>Raised by tokeneater() if detecting an ambiguous indent.</td> </tr><tr> <td><a href="#Whitespace">Whitespace</a></td> -<td>Class implementing the whitespace checker.</td> +<td>Class implementing the whitespace checker.</td> </tr> </table> <h3>Functions</h3> <table> <tr> <td><a href="#check">check</a></td> -<td>Private function to check one Python source file for whitespace related problems.</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>Function to format the witnesses as a readable string.</td> +<td>Function to format the witnesses as a readable string.</td> </tr><tr> <td><a href="#process_tokens">process_tokens</a></td> -<td>Function processing all tokens generated by a tokenizer run.</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> - Raised by tokeneater() if detecting an ambiguous indent. - Captured and handled in check(). + 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>Constructor</td> +<td>Constructor</td> </tr><tr> <td><a href="#NannyNag.get_line">get_line</a></td> -<td>Method to retrieve the offending line.</td> +<td>Method to retrieve the offending line.</td> </tr><tr> <td><a href="#NannyNag.get_lineno">get_lineno</a></td> -<td>Method to retrieve the line number.</td> +<td>Method to retrieve the line number.</td> </tr><tr> <td><a href="#NannyNag.get_msg">get_msg</a></td> -<td>Method to retrieve the message.</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> - Constructor + Constructor </p><dl> <dt><i>lineno</i></dt> <dd> -Line number of the ambiguous indent. +Line number of the ambiguous indent. </dd><dt><i>msg</i></dt> <dd> -Descriptive message assigned to this problem. +Descriptive message assigned to this problem. </dd><dt><i>line</i></dt> <dd> -The offending source line. +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> - Method to retrieve the offending line. + Method to retrieve the offending line. </p><dl> <dt>Returns:</dt> <dd> -The line of code (string) +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> - Method to retrieve the line number. + Method to retrieve the line number. </p><dl> <dt>Returns:</dt> <dd> -The line number (integer) +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> - Method to retrieve the message. + Method to retrieve the message. </p><dl> <dt>Returns:</dt> <dd> -The error message (string) +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> - Class implementing the whitespace checker. + 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>Constructor</td> +<td>Constructor</td> </tr><tr> <td><a href="#Whitespace.equal">equal</a></td> -<td>Method to compare the indentation levels of two Whitespace objects for equality.</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>Method to determine the indentation level.</td> +<td>Method to determine the indentation level.</td> </tr><tr> <td><a href="#Whitespace.less">less</a></td> -<td>Method to compare the indentation level against another Whitespace objects to be smaller.</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>Method to calculate the length of longest contiguous run of spaces.</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>Method to calculate a tuple of witnessing tab size.</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>Method to calculate a tuple of witnessing tab size.</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> - Constructor + Constructor </p><dl> <dt><i>ws</i></dt> <dd> -The string to be checked. +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> - Method to compare the indentation levels of two Whitespace objects for equality. + Method to compare the indentation levels of two Whitespace objects for equality. </p><dl> <dt><i>other</i></dt> <dd> -Whitespace object to compare against. +Whitespace object to compare against. </dd> </dl><dl> <dt>Returns:</dt> <dd> -True, if we compare equal against the other Whitespace object. +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> - Method to determine the indentation level. + Method to determine the indentation level. </p><dl> <dt><i>tabsize</i></dt> <dd> -The length of a tab stop. (integer) +The length of a tab stop. (integer) </dd> </dl><dl> <dt>Returns:</dt> <dd> -indentation level (integer) +indentation level (integer) </dd> </dl><a NAME="Whitespace.less" ID="Whitespace.less"></a> <h4>Whitespace.less</h4> <b>less</b>(<i>other</i>) <p> - Method to compare the indentation level against another Whitespace objects to - be smaller. + Method to compare the indentation level against another Whitespace objects to + be smaller. </p><dl> <dt><i>other</i></dt> <dd> -Whitespace object to compare against. +Whitespace object to compare against. </dd> </dl><dl> <dt>Returns:</dt> <dd> -True, if we compare less against the other Whitespace object. +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> - Method to calculate the length of longest contiguous run of spaces. + Method to calculate the length of longest contiguous run of spaces. </p><dl> <dt>Returns:</dt> <dd> -The length of longest contiguous run of spaces (whether or not - preceding a tab) +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> - Method to calculate a tuple of witnessing tab size. + Method to calculate a tuple of witnessing tab size. </p><p> - Intended to be used after not self.equal(other) is known, in which - case it will return at least one witnessing tab size. + 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> -Whitespace object to calculate against. +Whitespace object to calculate against. </dd> </dl><dl> <dt>Returns:</dt> <dd> -A list of tuples (ts, i1, i2) such that - i1 == self.indent_level(ts) != other.indent_level(ts) == i2. +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> - Method to calculate a tuple of witnessing tab size. + Method to calculate a tuple of witnessing tab size. </p><p> - Intended to be used after not self.less(other is known, in which - case it will return at least one witnessing tab size. + 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> -Whitespace object to calculate against. +Whitespace object to calculate against. </dd> </dl><dl> <dt>Returns:</dt> <dd> -A list of tuples (ts, i1, i2) such that - i1 == self.indent_level(ts) >= other.indent_level(ts) == i2. +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> - Private function to check one Python source file for whitespace related problems. + Private function to check one Python source file for whitespace related problems. </p><dl> <dt><i>file</i></dt> <dd> -source filename (string) +source filename (string) </dd> </dl><dl> <dt>Returns:</dt> <dd> -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. +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> - Function to format the witnesses as a readable string. + Function to format the witnesses as a readable string. </p><dl> <dt><i>w</i></dt> <dd> -A list of witnesses +A list of witnesses </dd> </dl><dl> <dt>Returns:</dt> <dd> -A formated string of the witnesses. +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> - Function processing all tokens generated by a tokenizer run. + Function processing all tokens generated by a tokenizer run. </p><dl> <dt><i>tokens</i></dt> <dd> -list of tokens +list of tokens </dd> </dl> <div align="right"><a href="#top">Up</a></div>