src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.Imports.LocalImportVisitor.html

Sat, 26 Apr 2025 12:34:32 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 26 Apr 2025 12:34:32 +0200
branch
eric7
changeset 11240
c48c615c04a3
parent 10479
856476537696
permissions
-rw-r--r--

MicroPython
- Added a configuration option to disable the support for the no longer produced Pimoroni Pico Wireless Pack.

<!DOCTYPE html>
<html><head>
<title>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Imports.LocalImportVisitor</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<a NAME="top" ID="top"></a>
<h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Imports.LocalImportVisitor</h1>
<p>
Module implementing a node visitor for checking local import statements.
</p>

<h3>Global Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>

<h3>Classes</h3>
<table>
<tr>
<td><a href="#LocalImportVisitor">LocalImportVisitor</a></td>
<td>Class implementing a node visitor for checking local import statements.</td>
</tr>
</table>

<h3>Functions</h3>
<table>
<tr><td>None</td></tr>
</table>

<hr />
<hr />
<a NAME="LocalImportVisitor" ID="LocalImportVisitor"></a>
<h2>LocalImportVisitor</h2>
<p>
    Class implementing a node visitor for checking local import statements.
</p>

<h3>Derived from</h3>
ast.NodeVisitor
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>

<h3>Class Methods</h3>
<table>
<tr><td>None</td></tr>
</table>

<h3>Methods</h3>
<table>
<tr>
<td><a href="#LocalImportVisitor.__init__">LocalImportVisitor</a></td>
<td>Constructor</td>
</tr>
<tr>
<td><a href="#LocalImportVisitor.__assertExternalModule">__assertExternalModule</a></td>
<td>Private method to assert the given node.</td>
</tr>
<tr>
<td><a href="#LocalImportVisitor.__visitImportNode">__visitImportNode</a></td>
<td>Private method to handle an import or import from statement.</td>
</tr>
<tr>
<td><a href="#LocalImportVisitor.visit">visit</a></td>
<td>Public method to traverse the tree of an AST node.</td>
</tr>
<tr>
<td><a href="#LocalImportVisitor.visit_FunctionDef">visit_FunctionDef</a></td>
<td>Public method to handle a function definition.</td>
</tr>
<tr>
<td><a href="#LocalImportVisitor.visit_Import">visit_Import</a></td>
<td>Public method to handle an import statement.</td>
</tr>
<tr>
<td><a href="#LocalImportVisitor.visit_ImportFrom">visit_ImportFrom</a></td>
<td>Public method to handle an import from statement.</td>
</tr>
</table>

<h3>Static Methods</h3>
<table>
<tr><td>None</td></tr>
</table>


<a NAME="LocalImportVisitor.__init__" ID="LocalImportVisitor.__init__"></a>
<h4>LocalImportVisitor (Constructor)</h4>
<b>LocalImportVisitor</b>(<i>args, checker</i>)
<p>
        Constructor
</p>

<dl>

<dt><i>args</i> (dict)</dt>
<dd>
dictionary containing the checker arguments
</dd>
<dt><i>checker</i> (ImportsChecker)</dt>
<dd>
reference to the checker
</dd>
</dl>
<a NAME="LocalImportVisitor.__assertExternalModule" ID="LocalImportVisitor.__assertExternalModule"></a>
<h4>LocalImportVisitor.__assertExternalModule</h4>
<b>__assertExternalModule</b>(<i>node, module</i>)
<p>
        Private method to assert the given node.
</p>

<dl>

<dt><i>node</i> (ast.stmt)</dt>
<dd>
reference to the node to be processed
</dd>
<dt><i>module</i> (str)</dt>
<dd>
name of the module
</dd>
</dl>
<a NAME="LocalImportVisitor.__visitImportNode" ID="LocalImportVisitor.__visitImportNode"></a>
<h4>LocalImportVisitor.__visitImportNode</h4>
<b>__visitImportNode</b>(<i>node</i>)
<p>
        Private method to handle an import or import from statement.
</p>

<dl>

<dt><i>node</i> (ast.Import or ast.ImportFrom)</dt>
<dd>
reference to the node to be processed
</dd>
</dl>
<a NAME="LocalImportVisitor.visit" ID="LocalImportVisitor.visit"></a>
<h4>LocalImportVisitor.visit</h4>
<b>visit</b>(<i>node</i>)
<p>
        Public method to traverse the tree of an AST node.
</p>

<dl>

<dt><i>node</i> (ast.AST)</dt>
<dd>
AST node to parse
</dd>
</dl>
<a NAME="LocalImportVisitor.visit_FunctionDef" ID="LocalImportVisitor.visit_FunctionDef"></a>
<h4>LocalImportVisitor.visit_FunctionDef</h4>
<b>visit_FunctionDef</b>(<i>node</i>)
<p>
        Public method to handle a function definition.
</p>

<dl>

<dt><i>node</i> (ast.FunctionDef)</dt>
<dd>
reference to the node to be processed
</dd>
</dl>
<a NAME="LocalImportVisitor.visit_Import" ID="LocalImportVisitor.visit_Import"></a>
<h4>LocalImportVisitor.visit_Import</h4>
<b>visit_Import</b>(<i>node</i>)
<p>
        Public method to handle an import statement.
</p>

<dl>

<dt><i>node</i> (ast.Import)</dt>
<dd>
reference to the node to be processed
</dd>
</dl>
<a NAME="LocalImportVisitor.visit_ImportFrom" ID="LocalImportVisitor.visit_ImportFrom"></a>
<h4>LocalImportVisitor.visit_ImportFrom</h4>
<b>visit_ImportFrom</b>(<i>node</i>)
<p>
        Public method to handle an import from statement.
</p>

<dl>

<dt><i>node</i> (ast.ImportFrom)</dt>
<dd>
reference to the node to be processed
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>

eric ide

mercurial