Thu, 04 Jan 2024 18:02:25 +0100
Fine tuned the source code documentation template and regenerated the source code documentation.
<!DOCTYPE html> <html><head> <title>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Simplify.SimplifyChecker</title> <meta charset="UTF-8"> <link rel="stylesheet" href="styles.css"> </head> <body> <a NAME="top" ID="top"></a> <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Simplify.SimplifyChecker</h1> <p> Module implementing the checker for simplifying Python code. </p> <h3>Global Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> <table> <tr> <td><a href="#SimplifyChecker">SimplifyChecker</a></td> <td>Class implementing a checker for to help simplifying Python code.</td> </tr> </table> <h3>Functions</h3> <table> <tr><td>None</td></tr> </table> <hr /> <hr /> <a NAME="SimplifyChecker" ID="SimplifyChecker"></a> <h2>SimplifyChecker</h2> <p> Class implementing a checker for to help simplifying Python code. </p> <h3>Derived from</h3> None <h3>Class Attributes</h3> <table> <tr><td>Codes</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#SimplifyChecker.__init__">SimplifyChecker</a></td> <td>Constructor</td> </tr> <tr> <td><a href="#SimplifyChecker.__addMeta">__addMeta</a></td> <td>Private method to amend the nodes of the given AST tree with backward and forward references.</td> </tr> <tr> <td><a href="#SimplifyChecker.__error">__error</a></td> <td>Private method to record an issue.</td> </tr> <tr> <td><a href="#SimplifyChecker.__ignoreCode">__ignoreCode</a></td> <td>Private method to check if the message code should be ignored.</td> </tr> <tr> <td><a href="#SimplifyChecker.run">run</a></td> <td>Public method to check the given source against functions to be replaced by 'pathlib' equivalents.</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="SimplifyChecker.__init__" ID="SimplifyChecker.__init__"></a> <h4>SimplifyChecker (Constructor)</h4> <b>SimplifyChecker</b>(<i>source, filename, tree, selected, ignored, expected, repeat</i>) <p> Constructor </p> <dl> <dt><i>source</i> (list of str)</dt> <dd> source code to be checked </dd> <dt><i>filename</i> (str)</dt> <dd> name of the source file </dd> <dt><i>tree</i> (ast.Module)</dt> <dd> AST tree of the source code </dd> <dt><i>selected</i> (list of str)</dt> <dd> list of selected codes </dd> <dt><i>ignored</i> (list of str)</dt> <dd> list of codes to be ignored </dd> <dt><i>expected</i> (list of str)</dt> <dd> list of expected codes </dd> <dt><i>repeat</i> (bool)</dt> <dd> flag indicating to report each occurrence of a code </dd> </dl> <a NAME="SimplifyChecker.__addMeta" ID="SimplifyChecker.__addMeta"></a> <h4>SimplifyChecker.__addMeta</h4> <b>__addMeta</b>(<i>root, level=0</i>) <p> Private method to amend the nodes of the given AST tree with backward and forward references. </p> <dl> <dt><i>root</i> (ast.AST)</dt> <dd> reference to the root node of the tree </dd> <dt><i>level</i> (int (optional))</dt> <dd> nesting level (defaults to 0) </dd> </dl> <a NAME="SimplifyChecker.__error" ID="SimplifyChecker.__error"></a> <h4>SimplifyChecker.__error</h4> <b>__error</b>(<i>lineNumber, offset, code, *args</i>) <p> Private method to record an issue. </p> <dl> <dt><i>lineNumber</i> (int)</dt> <dd> line number of the issue </dd> <dt><i>offset</i> (int)</dt> <dd> position within line of the issue </dd> <dt><i>code</i> (str)</dt> <dd> message code </dd> <dt><i>args</i> (list)</dt> <dd> arguments for the message </dd> </dl> <a NAME="SimplifyChecker.__ignoreCode" ID="SimplifyChecker.__ignoreCode"></a> <h4>SimplifyChecker.__ignoreCode</h4> <b>__ignoreCode</b>(<i>code</i>) <p> Private method to check if the message code should be ignored. </p> <dl> <dt><i>code</i> (str)</dt> <dd> message code to check for </dd> </dl> <dl> <dt>Return:</dt> <dd> flag indicating to ignore the given code </dd> </dl> <dl> <dt>Return Type:</dt> <dd> bool </dd> </dl> <a NAME="SimplifyChecker.run" ID="SimplifyChecker.run"></a> <h4>SimplifyChecker.run</h4> <b>run</b>(<i></i>) <p> Public method to check the given source against functions to be replaced by 'pathlib' equivalents. </p> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>