src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.Miscellaneous.MiscellaneousChecker.html

branch
eric7
changeset 10368
8765229e7cc8
parent 10358
957c9de01d42
child 10417
c6011e501282
--- a/src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.Miscellaneous.MiscellaneousChecker.html	Fri Dec 01 16:19:15 2023 +0100
+++ b/src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.Miscellaneous.MiscellaneousChecker.html	Fri Dec 01 16:22:02 2023 +0100
@@ -29,10 +29,6 @@
 <td>Class implementing a node visitor to check datetime function calls.</td>
 </tr>
 <tr>
-<td><a href="#LoggingVisitor">LoggingVisitor</a></td>
-<td>Class implementing a node visitor to check logging statements.</td>
-</tr>
-<tr>
 <td><a href="#M520NameFinder">M520NameFinder</a></td>
 <td>Class to extract a name out of a tree of nodes ignoring names defined within the local scope of a comprehension.</td>
 </tr>
@@ -65,6 +61,10 @@
 <td><a href="#composeCallPath">composeCallPath</a></td>
 <td>Generator function to assemble the call path of a given node.</td>
 </tr>
+<tr>
+<td><a href="#pairwise">pairwise</a></td>
+<td></td>
+</tr>
 </table>
 <hr />
 <hr />
@@ -1509,244 +1509,6 @@
 <div align="right"><a href="#top">Up</a></div>
 <hr />
 <hr />
-<a NAME="LoggingVisitor" ID="LoggingVisitor"></a>
-<h2>LoggingVisitor</h2>
-
-<p>
-    Class implementing a node visitor to check logging statements.
-</p>
-<h3>Derived from</h3>
-ast.NodeVisitor
-<h3>Class Attributes</h3>
-
-<table>
-<tr><td>LoggingLevels</td></tr>
-</table>
-<h3>Class Methods</h3>
-
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Methods</h3>
-
-<table>
-
-<tr>
-<td><a href="#LoggingVisitor.__init__">LoggingVisitor</a></td>
-<td>Constructor</td>
-</tr>
-<tr>
-<td><a href="#LoggingVisitor.__detectLoggingLevel">__detectLoggingLevel</a></td>
-<td>Private method to decide whether an AST Call is a logging call.</td>
-</tr>
-<tr>
-<td><a href="#LoggingVisitor.__isFormatCall">__isFormatCall</a></td>
-<td>Private method to check if a function call uses format.</td>
-</tr>
-<tr>
-<td><a href="#LoggingVisitor.__withinExtraKeyword">__withinExtraKeyword</a></td>
-<td>Private method to check, if we are inside the extra keyword.</td>
-</tr>
-<tr>
-<td><a href="#LoggingVisitor.__withinLoggingArgument">__withinLoggingArgument</a></td>
-<td>Private method to check, if we are inside a logging argument.</td>
-</tr>
-<tr>
-<td><a href="#LoggingVisitor.__withinLoggingStatement">__withinLoggingStatement</a></td>
-<td>Private method to check, if we are inside a logging statement.</td>
-</tr>
-<tr>
-<td><a href="#LoggingVisitor.visit_BinOp">visit_BinOp</a></td>
-<td>Public method to handle binary operations while processing the first logging argument.</td>
-</tr>
-<tr>
-<td><a href="#LoggingVisitor.visit_Call">visit_Call</a></td>
-<td>Public method to handle a function call.</td>
-</tr>
-<tr>
-<td><a href="#LoggingVisitor.visit_JoinedStr">visit_JoinedStr</a></td>
-<td>Public method to handle f-string arguments.</td>
-</tr>
-</table>
-<h3>Static Methods</h3>
-
-<table>
-<tr><td>None</td></tr>
-</table>
-
-<a NAME="LoggingVisitor.__init__" ID="LoggingVisitor.__init__"></a>
-<h4>LoggingVisitor (Constructor)</h4>
-<b>LoggingVisitor</b>(<i></i>)
-
-<p>
-        Constructor
-</p>
-<a NAME="LoggingVisitor.__detectLoggingLevel" ID="LoggingVisitor.__detectLoggingLevel"></a>
-<h4>LoggingVisitor.__detectLoggingLevel</h4>
-<b>__detectLoggingLevel</b>(<i>node</i>)
-
-<p>
-        Private method to decide whether an AST Call is a logging call.
-</p>
-<dl>
-
-<dt><i>node</i> (ast.Call)</dt>
-<dd>
-reference to the node to be processed
-</dd>
-</dl>
-<dl>
-<dt>Return:</dt>
-<dd>
-logging level
-</dd>
-</dl>
-<dl>
-<dt>Return Type:</dt>
-<dd>
-str or None
-</dd>
-</dl>
-<a NAME="LoggingVisitor.__isFormatCall" ID="LoggingVisitor.__isFormatCall"></a>
-<h4>LoggingVisitor.__isFormatCall</h4>
-<b>__isFormatCall</b>(<i>node</i>)
-
-<p>
-        Private method to check if a function call uses format.
-</p>
-<dl>
-
-<dt><i>node</i> (ast.Call)</dt>
-<dd>
-reference to the node to be processed
-</dd>
-</dl>
-<dl>
-<dt>Return:</dt>
-<dd>
-flag indicating the function call uses format
-</dd>
-</dl>
-<dl>
-<dt>Return Type:</dt>
-<dd>
-bool
-</dd>
-</dl>
-<a NAME="LoggingVisitor.__withinExtraKeyword" ID="LoggingVisitor.__withinExtraKeyword"></a>
-<h4>LoggingVisitor.__withinExtraKeyword</h4>
-<b>__withinExtraKeyword</b>(<i>node</i>)
-
-<p>
-        Private method to check, if we are inside the extra keyword.
-</p>
-<dl>
-
-<dt><i>node</i> (ast.keyword)</dt>
-<dd>
-reference to the node to be checked
-</dd>
-</dl>
-<dl>
-<dt>Return:</dt>
-<dd>
-flag indicating we are inside the extra keyword
-</dd>
-</dl>
-<dl>
-<dt>Return Type:</dt>
-<dd>
-bool
-</dd>
-</dl>
-<a NAME="LoggingVisitor.__withinLoggingArgument" ID="LoggingVisitor.__withinLoggingArgument"></a>
-<h4>LoggingVisitor.__withinLoggingArgument</h4>
-<b>__withinLoggingArgument</b>(<i></i>)
-
-<p>
-        Private method to check, if we are inside a logging argument.
-</p>
-<dl>
-<dt>Return:</dt>
-<dd>
-flag indicating we are inside a logging argument
-</dd>
-</dl>
-<dl>
-<dt>Return Type:</dt>
-<dd>
-bool
-</dd>
-</dl>
-<a NAME="LoggingVisitor.__withinLoggingStatement" ID="LoggingVisitor.__withinLoggingStatement"></a>
-<h4>LoggingVisitor.__withinLoggingStatement</h4>
-<b>__withinLoggingStatement</b>(<i></i>)
-
-<p>
-        Private method to check, if we are inside a logging statement.
-</p>
-<dl>
-<dt>Return:</dt>
-<dd>
-flag indicating we are inside a logging statement
-</dd>
-</dl>
-<dl>
-<dt>Return Type:</dt>
-<dd>
-bool
-</dd>
-</dl>
-<a NAME="LoggingVisitor.visit_BinOp" ID="LoggingVisitor.visit_BinOp"></a>
-<h4>LoggingVisitor.visit_BinOp</h4>
-<b>visit_BinOp</b>(<i>node</i>)
-
-<p>
-        Public method to handle binary operations while processing the first
-        logging argument.
-</p>
-<dl>
-
-<dt><i>node</i> (ast.BinOp)</dt>
-<dd>
-reference to the node to be processed
-</dd>
-</dl>
-<a NAME="LoggingVisitor.visit_Call" ID="LoggingVisitor.visit_Call"></a>
-<h4>LoggingVisitor.visit_Call</h4>
-<b>visit_Call</b>(<i>node</i>)
-
-<p>
-        Public method to handle a function call.
-</p>
-<p>
-        Every logging statement and string format is expected to be a function
-        call.
-</p>
-<dl>
-
-<dt><i>node</i> (ast.Call)</dt>
-<dd>
-reference to the node to be processed
-</dd>
-</dl>
-<a NAME="LoggingVisitor.visit_JoinedStr" ID="LoggingVisitor.visit_JoinedStr"></a>
-<h4>LoggingVisitor.visit_JoinedStr</h4>
-<b>visit_JoinedStr</b>(<i>node</i>)
-
-<p>
-        Public method to handle f-string arguments.
-</p>
-<dl>
-
-<dt><i>node</i> (ast.JoinedStr)</dt>
-<dd>
-reference to the node to be processed
-</dd>
-</dl>
-<div align="right"><a href="#top">Up</a></div>
-<hr />
-<hr />
 <a NAME="M520NameFinder" ID="M520NameFinder"></a>
 <h2>M520NameFinder</h2>
 
@@ -1929,6 +1691,10 @@
 <td>Private method to check, if dictionary keys appear in sorted order.</td>
 </tr>
 <tr>
+<td><a href="#MiscellaneousChecker.__checkExplicitStringConcat">__checkExplicitStringConcat</a></td>
+<td>Private method to check for explicitly concatenated strings.</td>
+</tr>
+<tr>
 <td><a href="#MiscellaneousChecker.__checkFormatString">__checkFormatString</a></td>
 <td>Private method to check string format strings.</td>
 </tr>
@@ -1941,14 +1707,14 @@
 <td>Private method to check the 'gettext' import statement.</td>
 </tr>
 <tr>
+<td><a href="#MiscellaneousChecker.__checkImplicitStringConcat">__checkImplicitStringConcat</a></td>
+<td>Private method to check for implicitly concatenated strings.</td>
+</tr>
+<tr>
 <td><a href="#MiscellaneousChecker.__checkLineContinuation">__checkLineContinuation</a></td>
 <td>Private method to check line continuation using backslash.</td>
 </tr>
 <tr>
-<td><a href="#MiscellaneousChecker.__checkLogging">__checkLogging</a></td>
-<td>Private method to check logging statements.</td>
-</tr>
-<tr>
 <td><a href="#MiscellaneousChecker.__checkMutableDefault">__checkMutableDefault</a></td>
 <td>Private method to check for use of mutable types as default arguments.</td>
 </tr>
@@ -1997,6 +1763,10 @@
 <td>Private method to check if the message code should be ignored.</td>
 </tr>
 <tr>
+<td><a href="#MiscellaneousChecker.__isImplicitStringConcat">__isImplicitStringConcat</a></td>
+<td>Private method to check, if the given strings indicate an implicit string concatenation.</td>
+</tr>
+<tr>
 <td><a href="#MiscellaneousChecker.run">run</a></td>
 <td>Public method to check the given source against miscellaneous conditions.</td>
 </tr>
@@ -2085,6 +1855,10 @@
 <p>
         Private method to check some comprehension related things.
 </p>
+<p>
+        This method is adapted from: flake8-comprehensions v3.14.0
+        Original: Copyright (c) 2017 Adam Johnson
+</p>
 <a NAME="MiscellaneousChecker.__checkCopyright" ID="MiscellaneousChecker.__checkCopyright"></a>
 <h4>MiscellaneousChecker.__checkCopyright</h4>
 <b>__checkCopyright</b>(<i></i>)
@@ -2106,6 +1880,13 @@
 <p>
         Private method to check, if dictionary keys appear in sorted order.
 </p>
+<a NAME="MiscellaneousChecker.__checkExplicitStringConcat" ID="MiscellaneousChecker.__checkExplicitStringConcat"></a>
+<h4>MiscellaneousChecker.__checkExplicitStringConcat</h4>
+<b>__checkExplicitStringConcat</b>(<i></i>)
+
+<p>
+        Private method to check for explicitly concatenated strings.
+</p>
 <a NAME="MiscellaneousChecker.__checkFormatString" ID="MiscellaneousChecker.__checkFormatString"></a>
 <h4>MiscellaneousChecker.__checkFormatString</h4>
 <b>__checkFormatString</b>(<i></i>)
@@ -2127,6 +1908,13 @@
 <p>
         Private method to check the 'gettext' import statement.
 </p>
+<a NAME="MiscellaneousChecker.__checkImplicitStringConcat" ID="MiscellaneousChecker.__checkImplicitStringConcat"></a>
+<h4>MiscellaneousChecker.__checkImplicitStringConcat</h4>
+<b>__checkImplicitStringConcat</b>(<i></i>)
+
+<p>
+        Private method to check for implicitly concatenated strings.
+</p>
 <a NAME="MiscellaneousChecker.__checkLineContinuation" ID="MiscellaneousChecker.__checkLineContinuation"></a>
 <h4>MiscellaneousChecker.__checkLineContinuation</h4>
 <b>__checkLineContinuation</b>(<i></i>)
@@ -2134,13 +1922,6 @@
 <p>
         Private method to check line continuation using backslash.
 </p>
-<a NAME="MiscellaneousChecker.__checkLogging" ID="MiscellaneousChecker.__checkLogging"></a>
-<h4>MiscellaneousChecker.__checkLogging</h4>
-<b>__checkLogging</b>(<i></i>)
-
-<p>
-        Private method to check logging statements.
-</p>
 <a NAME="MiscellaneousChecker.__checkMutableDefault" ID="MiscellaneousChecker.__checkMutableDefault"></a>
 <h4>MiscellaneousChecker.__checkMutableDefault</h4>
 <b>__checkMutableDefault</b>(<i></i>)
@@ -2314,6 +2095,31 @@
 bool
 </dd>
 </dl>
+<a NAME="MiscellaneousChecker.__isImplicitStringConcat" ID="MiscellaneousChecker.__isImplicitStringConcat"></a>
+<h4>MiscellaneousChecker.__isImplicitStringConcat</h4>
+<b>__isImplicitStringConcat</b>(<i>first, second</i>)
+
+<p>
+            Private method to check, if the given strings indicate an implicit string
+            concatenation.
+</p>
+<dl>
+
+<dt><i>first</i> (tuple)</dt>
+<dd>
+first token
+</dd>
+<dt><i>second</i> (tuple)</dt>
+<dd>
+second token
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+flag indicating an implicit string concatenation
+</dd>
+</dl>
 <a NAME="MiscellaneousChecker.run" ID="MiscellaneousChecker.run"></a>
 <h4>MiscellaneousChecker.run</h4>
 <b>run</b>(<i></i>)
@@ -3392,4 +3198,11 @@
 </dl>
 <div align="right"><a href="#top">Up</a></div>
 <hr />
+<hr />
+<a NAME="pairwise" ID="pairwise"></a>
+<h2>pairwise</h2>
+<b>pairwise</b>(<i>iterable</i>)
+
+<div align="right"><a href="#top">Up</a></div>
+<hr />
 </body></html>
\ No newline at end of file

eric ide

mercurial