diff -r c32a350d2414 -r bf9379f964f3 eric6/Documentation/Source/eric6.Plugins.CheckerPlugins.CodeStyleChecker.AnnotationsChecker.html --- a/eric6/Documentation/Source/eric6.Plugins.CheckerPlugins.CodeStyleChecker.AnnotationsChecker.html Wed Sep 18 20:25:52 2019 +0200 +++ b/eric6/Documentation/Source/eric6.Plugins.CheckerPlugins.CodeStyleChecker.AnnotationsChecker.html Thu Sep 19 19:14:34 2019 +0200 @@ -39,7 +39,13 @@ </table> <h3>Functions</h3> <table> -<tr><td>None</td></tr> +<tr> +<td><a href="#getAnnotationComplexity">getAnnotationComplexity</a></td> +<td>Function to determine the annotation complexity.</td> +</tr><tr> +<td><a href="#hasTypeAnnotations">hasTypeAnnotations</a></td> +<td>Function to check for type annotations.</td> +</tr> </table> <hr /><hr /> <a NAME="AnnotationsChecker" ID="AnnotationsChecker"></a> @@ -63,6 +69,12 @@ <td><a href="#AnnotationsChecker.__init__">AnnotationsChecker</a></td> <td>Constructor</td> </tr><tr> +<td><a href="#AnnotationsChecker.__checkAnnotationComplexity">__checkAnnotationComplexity</a></td> +<td>Private method to check the type annotation complexity.</td> +</tr><tr> +<td><a href="#AnnotationsChecker.__checkAnnotationsCoverage">__checkAnnotationsCoverage</a></td> +<td>Private method to check for function annotation coverage.</td> +</tr><tr> <td><a href="#AnnotationsChecker.__checkFunctionAnnotations">__checkFunctionAnnotations</a></td> <td>Private method to check for function annotation issues.</td> </tr><tr> @@ -88,7 +100,7 @@ </table> <a NAME="AnnotationsChecker.__init__" ID="AnnotationsChecker.__init__"></a> <h4>AnnotationsChecker (Constructor)</h4> -<b>AnnotationsChecker</b>(<i>source, filename, select, ignore, expected, repeat</i>) +<b>AnnotationsChecker</b>(<i>source, filename, select, ignore, expected, repeat, args</i>) <p> Constructor </p><dl> @@ -110,8 +122,21 @@ </dd><dt><i>repeat</i> (bool)</dt> <dd> flag indicating to report each occurrence of a code +</dd><dt><i>args</i> (dict)</dt> +<dd> +dictionary of arguments for the annotation checks </dd> -</dl><a NAME="AnnotationsChecker.__checkFunctionAnnotations" ID="AnnotationsChecker.__checkFunctionAnnotations"></a> +</dl><a NAME="AnnotationsChecker.__checkAnnotationComplexity" ID="AnnotationsChecker.__checkAnnotationComplexity"></a> +<h4>AnnotationsChecker.__checkAnnotationComplexity</h4> +<b>__checkAnnotationComplexity</b>(<i></i>) +<p> + Private method to check the type annotation complexity. +</p><a NAME="AnnotationsChecker.__checkAnnotationsCoverage" ID="AnnotationsChecker.__checkAnnotationsCoverage"></a> +<h4>AnnotationsChecker.__checkAnnotationsCoverage</h4> +<b>__checkAnnotationsCoverage</b>(<i></i>) +<p> + Private method to check for function annotation coverage. +</p><a NAME="AnnotationsChecker.__checkFunctionAnnotations" ID="AnnotationsChecker.__checkFunctionAnnotations"></a> <h4>AnnotationsChecker.__checkFunctionAnnotations</h4> <b>__checkFunctionAnnotations</b>(<i></i>) <p> @@ -319,5 +344,52 @@ </dd> </dl> <div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="getAnnotationComplexity" ID="getAnnotationComplexity"></a> +<h2>getAnnotationComplexity</h2> +<b>getAnnotationComplexity</b>(<i>annotationNode</i>) +<p> + Function to determine the annotation complexity. +</p><dl> +<dt><i>annotationNode</i> (ast.AST)</dt> +<dd> +reference to the node to determine the annotation + complexity for +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +annotation complexity +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> += int +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="hasTypeAnnotations" ID="hasTypeAnnotations"></a> +<h2>hasTypeAnnotations</h2> +<b>hasTypeAnnotations</b>(<i>funcNode</i>) +<p> + Function to check for type annotations. +</p><dl> +<dt><i>funcNode</i> (ast.AsyncFunctionDef or ast.FunctionDef)</dt> +<dd> +reference to the function definition node to be checked +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +flag indicating the presence of type annotations +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +bool +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> <hr /> </body></html> \ No newline at end of file