src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.Simplify.SimplifyChecker.html

branch
eric7
changeset 10479
856476537696
parent 9295
d14096c04126
child 11150
73d80859079c
equal deleted inserted replaced
10478:de9106c55c3d 10479:856476537696
5 <link rel="stylesheet" href="styles.css"> 5 <link rel="stylesheet" href="styles.css">
6 </head> 6 </head>
7 <body> 7 <body>
8 <a NAME="top" ID="top"></a> 8 <a NAME="top" ID="top"></a>
9 <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Simplify.SimplifyChecker</h1> 9 <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Simplify.SimplifyChecker</h1>
10
11 <p> 10 <p>
12 Module implementing the checker for simplifying Python code. 11 Module implementing the checker for simplifying Python code.
13 </p> 12 </p>
13
14 <h3>Global Attributes</h3> 14 <h3>Global Attributes</h3>
15 15 <table>
16 <table> 16 <tr><td>None</td></tr>
17 <tr><td>None</td></tr> 17 </table>
18 </table> 18
19 <h3>Classes</h3> 19 <h3>Classes</h3>
20 20 <table>
21 <table>
22
23 <tr> 21 <tr>
24 <td><a href="#SimplifyChecker">SimplifyChecker</a></td> 22 <td><a href="#SimplifyChecker">SimplifyChecker</a></td>
25 <td>Class implementing a checker for to help simplifying Python code.</td> 23 <td>Class implementing a checker for to help simplifying Python code.</td>
26 </tr> 24 </tr>
27 </table> 25 </table>
26
28 <h3>Functions</h3> 27 <h3>Functions</h3>
29 28 <table>
30 <table> 29 <tr><td>None</td></tr>
31 <tr><td>None</td></tr> 30 </table>
32 </table> 31
33 <hr /> 32 <hr />
34 <hr /> 33 <hr />
35 <a NAME="SimplifyChecker" ID="SimplifyChecker"></a> 34 <a NAME="SimplifyChecker" ID="SimplifyChecker"></a>
36 <h2>SimplifyChecker</h2> 35 <h2>SimplifyChecker</h2>
37
38 <p> 36 <p>
39 Class implementing a checker for to help simplifying Python code. 37 Class implementing a checker for to help simplifying Python code.
40 </p> 38 </p>
39
41 <h3>Derived from</h3> 40 <h3>Derived from</h3>
42 None 41 None
43 <h3>Class Attributes</h3> 42 <h3>Class Attributes</h3>
44
45 <table> 43 <table>
46 <tr><td>Codes</td></tr> 44 <tr><td>Codes</td></tr>
47 </table> 45 </table>
46
48 <h3>Class Methods</h3> 47 <h3>Class Methods</h3>
49 48 <table>
50 <table> 49 <tr><td>None</td></tr>
51 <tr><td>None</td></tr> 50 </table>
52 </table> 51
53 <h3>Methods</h3> 52 <h3>Methods</h3>
54 53 <table>
55 <table>
56
57 <tr> 54 <tr>
58 <td><a href="#SimplifyChecker.__init__">SimplifyChecker</a></td> 55 <td><a href="#SimplifyChecker.__init__">SimplifyChecker</a></td>
59 <td>Constructor</td> 56 <td>Constructor</td>
60 </tr> 57 </tr>
61 <tr> 58 <tr>
73 <tr> 70 <tr>
74 <td><a href="#SimplifyChecker.run">run</a></td> 71 <td><a href="#SimplifyChecker.run">run</a></td>
75 <td>Public method to check the given source against functions to be replaced by 'pathlib' equivalents.</td> 72 <td>Public method to check the given source against functions to be replaced by 'pathlib' equivalents.</td>
76 </tr> 73 </tr>
77 </table> 74 </table>
75
78 <h3>Static Methods</h3> 76 <h3>Static Methods</h3>
79 77 <table>
80 <table> 78 <tr><td>None</td></tr>
81 <tr><td>None</td></tr> 79 </table>
82 </table> 80
83 81
84 <a NAME="SimplifyChecker.__init__" ID="SimplifyChecker.__init__"></a> 82 <a NAME="SimplifyChecker.__init__" ID="SimplifyChecker.__init__"></a>
85 <h4>SimplifyChecker (Constructor)</h4> 83 <h4>SimplifyChecker (Constructor)</h4>
86 <b>SimplifyChecker</b>(<i>source, filename, tree, selected, ignored, expected, repeat</i>) 84 <b>SimplifyChecker</b>(<i>source, filename, tree, selected, ignored, expected, repeat</i>)
87
88 <p> 85 <p>
89 Constructor 86 Constructor
90 </p> 87 </p>
88
91 <dl> 89 <dl>
92 90
93 <dt><i>source</i> (list of str)</dt> 91 <dt><i>source</i> (list of str)</dt>
94 <dd> 92 <dd>
95 source code to be checked 93 source code to be checked
120 </dd> 118 </dd>
121 </dl> 119 </dl>
122 <a NAME="SimplifyChecker.__addMeta" ID="SimplifyChecker.__addMeta"></a> 120 <a NAME="SimplifyChecker.__addMeta" ID="SimplifyChecker.__addMeta"></a>
123 <h4>SimplifyChecker.__addMeta</h4> 121 <h4>SimplifyChecker.__addMeta</h4>
124 <b>__addMeta</b>(<i>root, level=0</i>) 122 <b>__addMeta</b>(<i>root, level=0</i>)
125
126 <p> 123 <p>
127 Private method to amend the nodes of the given AST tree with backward and 124 Private method to amend the nodes of the given AST tree with backward and
128 forward references. 125 forward references.
129 </p> 126 </p>
127
130 <dl> 128 <dl>
131 129
132 <dt><i>root</i> (ast.AST)</dt> 130 <dt><i>root</i> (ast.AST)</dt>
133 <dd> 131 <dd>
134 reference to the root node of the tree 132 reference to the root node of the tree
139 </dd> 137 </dd>
140 </dl> 138 </dl>
141 <a NAME="SimplifyChecker.__error" ID="SimplifyChecker.__error"></a> 139 <a NAME="SimplifyChecker.__error" ID="SimplifyChecker.__error"></a>
142 <h4>SimplifyChecker.__error</h4> 140 <h4>SimplifyChecker.__error</h4>
143 <b>__error</b>(<i>lineNumber, offset, code, *args</i>) 141 <b>__error</b>(<i>lineNumber, offset, code, *args</i>)
144
145 <p> 142 <p>
146 Private method to record an issue. 143 Private method to record an issue.
147 </p> 144 </p>
145
148 <dl> 146 <dl>
149 147
150 <dt><i>lineNumber</i> (int)</dt> 148 <dt><i>lineNumber</i> (int)</dt>
151 <dd> 149 <dd>
152 line number of the issue 150 line number of the issue
165 </dd> 163 </dd>
166 </dl> 164 </dl>
167 <a NAME="SimplifyChecker.__ignoreCode" ID="SimplifyChecker.__ignoreCode"></a> 165 <a NAME="SimplifyChecker.__ignoreCode" ID="SimplifyChecker.__ignoreCode"></a>
168 <h4>SimplifyChecker.__ignoreCode</h4> 166 <h4>SimplifyChecker.__ignoreCode</h4>
169 <b>__ignoreCode</b>(<i>code</i>) 167 <b>__ignoreCode</b>(<i>code</i>)
170
171 <p> 168 <p>
172 Private method to check if the message code should be ignored. 169 Private method to check if the message code should be ignored.
173 </p> 170 </p>
171
174 <dl> 172 <dl>
175 173
176 <dt><i>code</i> (str)</dt> 174 <dt><i>code</i> (str)</dt>
177 <dd> 175 <dd>
178 message code to check for 176 message code to check for
191 </dd> 189 </dd>
192 </dl> 190 </dl>
193 <a NAME="SimplifyChecker.run" ID="SimplifyChecker.run"></a> 191 <a NAME="SimplifyChecker.run" ID="SimplifyChecker.run"></a>
194 <h4>SimplifyChecker.run</h4> 192 <h4>SimplifyChecker.run</h4>
195 <b>run</b>(<i></i>) 193 <b>run</b>(<i></i>)
196
197 <p> 194 <p>
198 Public method to check the given source against functions 195 Public method to check the given source against functions
199 to be replaced by 'pathlib' equivalents. 196 to be replaced by 'pathlib' equivalents.
200 </p> 197 </p>
198
201 <div align="right"><a href="#top">Up</a></div> 199 <div align="right"><a href="#top">Up</a></div>
202 <hr /> 200 <hr />
203 </body></html> 201 </body></html>

eric ide

mercurial