src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.Naming.NamingStyleChecker.html

branch
eric7
changeset 10259
b51dfacef37f
parent 10070
9f5758c0fec1
child 10437
2f70ca07f0af
equal deleted inserted replaced
10258:e7764f992a01 10259:b51dfacef37f
62 <td><a href="#NamingStyleChecker.__checkClassName">__checkClassName</a></td> 62 <td><a href="#NamingStyleChecker.__checkClassName">__checkClassName</a></td>
63 <td>Private class to check the given node for class name conventions (N801, N818).</td> 63 <td>Private class to check the given node for class name conventions (N801, N818).</td>
64 </tr> 64 </tr>
65 <tr> 65 <tr>
66 <td><a href="#NamingStyleChecker.__checkFunctionArgumentNames">__checkFunctionArgumentNames</a></td> 66 <td><a href="#NamingStyleChecker.__checkFunctionArgumentNames">__checkFunctionArgumentNames</a></td>
67 <td></td> 67 <td>Private class to check the argument names of functions (N803, N804, N805, N806).</td>
68 </tr> 68 </tr>
69 <tr> 69 <tr>
70 <td><a href="#NamingStyleChecker.__checkFunctionName">__checkFunctionName</a></td> 70 <td><a href="#NamingStyleChecker.__checkFunctionName">__checkFunctionName</a></td>
71 <td></td> 71 <td>Private class to check the given node for function name conventions (N802, N809).</td>
72 </tr> 72 </tr>
73 <tr> 73 <tr>
74 <td><a href="#NamingStyleChecker.__checkImportAs">__checkImportAs</a></td> 74 <td><a href="#NamingStyleChecker.__checkImportAs">__checkImportAs</a></td>
75 <td></td> 75 <td>Private method to check that imports don't change the naming convention (N811, N812, N813, N814, N815).</td>
76 </tr> 76 </tr>
77 <tr> 77 <tr>
78 <td><a href="#NamingStyleChecker.__checkModule">__checkModule</a></td> 78 <td><a href="#NamingStyleChecker.__checkModule">__checkModule</a></td>
79 <td></td> 79 <td>Private method to check module naming conventions (N807, N808).</td>
80 </tr> 80 </tr>
81 <tr> 81 <tr>
82 <td><a href="#NamingStyleChecker.__checkNameToBeAvoided">__checkNameToBeAvoided</a></td> 82 <td><a href="#NamingStyleChecker.__checkNameToBeAvoided">__checkNameToBeAvoided</a></td>
83 <td></td> 83 <td>Private class to check the given node for a name to be avoided (N831).</td>
84 </tr> 84 </tr>
85 <tr> 85 <tr>
86 <td><a href="#NamingStyleChecker.__checkVariableNames">__checkVariableNames</a></td> 86 <td><a href="#NamingStyleChecker.__checkVariableNames">__checkVariableNames</a></td>
87 <td>Private method to check variable names in function, class and global scope (N821, N822, N823).</td> 87 <td>Private method to check variable names in function, class and global scope (N821, N822, N823).</td>
88 </tr> 88 </tr>
220 </dl> 220 </dl>
221 <a NAME="NamingStyleChecker.__checkFunctionArgumentNames" ID="NamingStyleChecker.__checkFunctionArgumentNames"></a> 221 <a NAME="NamingStyleChecker.__checkFunctionArgumentNames" ID="NamingStyleChecker.__checkFunctionArgumentNames"></a>
222 <h4>NamingStyleChecker.__checkFunctionArgumentNames</h4> 222 <h4>NamingStyleChecker.__checkFunctionArgumentNames</h4>
223 <b>__checkFunctionArgumentNames</b>(<i>node, parents</i>) 223 <b>__checkFunctionArgumentNames</b>(<i>node, parents</i>)
224 224
225 <p>
226 Private class to check the argument names of functions
227 (N803, N804, N805, N806).
228 </p>
229 <p>
230 The argument names of a function should be lowercase, with words
231 separated by underscores. A class method should have 'cls' as the
232 first argument. A method should have 'self' as the first argument.
233 </p>
234 <dl>
235
236 <dt><i>node</i></dt>
237 <dd>
238 AST note to check
239 </dd>
240 <dt><i>parents</i></dt>
241 <dd>
242 list of parent nodes
243 </dd>
244 </dl>
245 <dl>
246 <dt>Yield:</dt>
247 <dd>
248 tuple giving line number, offset within line and error code
249 </dd>
250 </dl>
251 <dl>
252 <dt>Yield Type:</dt>
253 <dd>
254 tuple of (int, int, str)
255 </dd>
256 </dl>
225 <a NAME="NamingStyleChecker.__checkFunctionName" ID="NamingStyleChecker.__checkFunctionName"></a> 257 <a NAME="NamingStyleChecker.__checkFunctionName" ID="NamingStyleChecker.__checkFunctionName"></a>
226 <h4>NamingStyleChecker.__checkFunctionName</h4> 258 <h4>NamingStyleChecker.__checkFunctionName</h4>
227 <b>__checkFunctionName</b>(<i>node, parents</i>) 259 <b>__checkFunctionName</b>(<i>node, parents</i>)
228 260
261 <p>
262 Private class to check the given node for function name
263 conventions (N802, N809).
264 </p>
265 <p>
266 Function names should be lowercase, with words separated by underscores
267 as necessary to improve readability. Functions <b>not</b> being
268 methods '__' in front and back are not allowed. Mixed case is allowed
269 only in contexts where that's already the prevailing style
270 (e.g. threading.py), to retain backwards compatibility.
271 </p>
272 <dl>
273
274 <dt><i>node</i></dt>
275 <dd>
276 AST note to check
277 </dd>
278 <dt><i>parents</i></dt>
279 <dd>
280 list of parent nodes
281 </dd>
282 </dl>
283 <dl>
284 <dt>Yield:</dt>
285 <dd>
286 tuple giving line number, offset within line and error code
287 </dd>
288 </dl>
289 <dl>
290 <dt>Yield Type:</dt>
291 <dd>
292 tuple of (int, int, str)
293 </dd>
294 </dl>
229 <a NAME="NamingStyleChecker.__checkImportAs" ID="NamingStyleChecker.__checkImportAs"></a> 295 <a NAME="NamingStyleChecker.__checkImportAs" ID="NamingStyleChecker.__checkImportAs"></a>
230 <h4>NamingStyleChecker.__checkImportAs</h4> 296 <h4>NamingStyleChecker.__checkImportAs</h4>
231 <b>__checkImportAs</b>(<i>node, parents</i>) 297 <b>__checkImportAs</b>(<i>node, parents</i>)
232 298
299 <p>
300 Private method to check that imports don't change the
301 naming convention (N811, N812, N813, N814, N815).
302 </p>
303 <dl>
304
305 <dt><i>node</i></dt>
306 <dd>
307 AST note to check
308 </dd>
309 <dt><i>parents</i></dt>
310 <dd>
311 list of parent nodes
312 </dd>
313 </dl>
314 <dl>
315 <dt>Yield:</dt>
316 <dd>
317 tuple giving line number, offset within line and error code
318 </dd>
319 </dl>
320 <dl>
321 <dt>Yield Type:</dt>
322 <dd>
323 tuple of (int, int, str)
324 </dd>
325 </dl>
233 <a NAME="NamingStyleChecker.__checkModule" ID="NamingStyleChecker.__checkModule"></a> 326 <a NAME="NamingStyleChecker.__checkModule" ID="NamingStyleChecker.__checkModule"></a>
234 <h4>NamingStyleChecker.__checkModule</h4> 327 <h4>NamingStyleChecker.__checkModule</h4>
235 <b>__checkModule</b>(<i>node, parents</i>) 328 <b>__checkModule</b>(<i>node, parents</i>)
236 329
330 <p>
331 Private method to check module naming conventions (N807, N808).
332 </p>
333 <p>
334 Module and package names should be lowercase.
335 </p>
336 <dl>
337
338 <dt><i>node</i></dt>
339 <dd>
340 AST note to check
341 </dd>
342 <dt><i>parents</i></dt>
343 <dd>
344 list of parent nodes
345 </dd>
346 </dl>
347 <dl>
348 <dt>Yield:</dt>
349 <dd>
350 tuple giving line number, offset within line and error code
351 </dd>
352 </dl>
353 <dl>
354 <dt>Yield Type:</dt>
355 <dd>
356 tuple of (int, int, str)
357 </dd>
358 </dl>
237 <a NAME="NamingStyleChecker.__checkNameToBeAvoided" ID="NamingStyleChecker.__checkNameToBeAvoided"></a> 359 <a NAME="NamingStyleChecker.__checkNameToBeAvoided" ID="NamingStyleChecker.__checkNameToBeAvoided"></a>
238 <h4>NamingStyleChecker.__checkNameToBeAvoided</h4> 360 <h4>NamingStyleChecker.__checkNameToBeAvoided</h4>
239 <b>__checkNameToBeAvoided</b>(<i>node, parents</i>) 361 <b>__checkNameToBeAvoided</b>(<i>node, parents</i>)
240 362
363 <p>
364 Private class to check the given node for a name to be avoided (N831).
365 </p>
366 <dl>
367
368 <dt><i>node</i></dt>
369 <dd>
370 AST note to check
371 </dd>
372 <dt><i>parents</i></dt>
373 <dd>
374 list of parent nodes
375 </dd>
376 </dl>
377 <dl>
378 <dt>Yield:</dt>
379 <dd>
380 tuple giving line number, offset within line and error code
381 </dd>
382 </dl>
383 <dl>
384 <dt>Yield Type:</dt>
385 <dd>
386 tuple of (int, int, str)
387 </dd>
388 </dl>
241 <a NAME="NamingStyleChecker.__checkVariableNames" ID="NamingStyleChecker.__checkVariableNames"></a> 389 <a NAME="NamingStyleChecker.__checkVariableNames" ID="NamingStyleChecker.__checkVariableNames"></a>
242 <h4>NamingStyleChecker.__checkVariableNames</h4> 390 <h4>NamingStyleChecker.__checkVariableNames</h4>
243 <b>__checkVariableNames</b>(<i>node, parents</i>) 391 <b>__checkVariableNames</b>(<i>node, parents</i>)
244 392
245 <p> 393 <p>

eric ide

mercurial