src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.AstUtilities.html

Fri, 27 Oct 2023 14:09:40 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 27 Oct 2023 14:09:40 +0200
branch
eric7
changeset 10259
b51dfacef37f
parent 10119
64147a7e6393
child 10417
c6011e501282
permissions
-rw-r--r--

Regenerated the source documentation with the corrected module parser.

<!DOCTYPE html>
<html><head>
<title>eric7.Plugins.CheckerPlugins.CodeStyleChecker.AstUtilities</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<a NAME="top" ID="top"></a>
<h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.AstUtilities</h1>

<p>
Module implementing some utility and compatibility functions for working with
the ast module.
</p>
<h3>Global Attributes</h3>

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

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

<table>

<tr>
<td><a href="#getValue">getValue</a></td>
<td>Function to extract the value of a node.</td>
</tr>
<tr>
<td><a href="#isBaseString">isBaseString</a></td>
<td>Function to check that a node is a bytes or string.</td>
</tr>
<tr>
<td><a href="#isBytes">isBytes</a></td>
<td>Function to check that a node is a bytes.</td>
</tr>
<tr>
<td><a href="#isEllipsis">isEllipsis</a></td>
<td>Function to check that a node is an ellipsis.</td>
</tr>
<tr>
<td><a href="#isNameConstant">isNameConstant</a></td>
<td>Function to check that a node is a name constant.</td>
</tr>
<tr>
<td><a href="#isNumber">isNumber</a></td>
<td>Function to check that a node is a number.</td>
</tr>
<tr>
<td><a href="#isString">isString</a></td>
<td>Function to check that a node is a string.</td>
</tr>
</table>
<hr />
<hr />
<a NAME="getValue" ID="getValue"></a>
<h2>getValue</h2>
<b>getValue</b>(<i>node</i>)

<p>
    Function to extract the value of a node.
</p>
<dl>

<dt><i>node</i> (ast.Constant)</dt>
<dd>
reference to the node to extract the value from
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
value of the node
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
any
</dd>
</dl>
<dl>

<dt>Raises <b>TypeError</b>:</dt>
<dd>
raised to indicate an unsupported type
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="isBaseString" ID="isBaseString"></a>
<h2>isBaseString</h2>
<b>isBaseString</b>(<i>node</i>)

<p>
    Function to check that a node is a bytes or string.
</p>
<dl>

<dt><i>node</i> (ast.AST)</dt>
<dd>
reference to the node to check
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
flag indicating a bytes or string
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="isBytes" ID="isBytes"></a>
<h2>isBytes</h2>
<b>isBytes</b>(<i>node</i>)

<p>
    Function to check that a node is a bytes.
</p>
<dl>

<dt><i>node</i> (ast.AST)</dt>
<dd>
reference to the node to check
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
flag indicating a bytes
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="isEllipsis" ID="isEllipsis"></a>
<h2>isEllipsis</h2>
<b>isEllipsis</b>(<i>node</i>)

<p>
    Function to check that a node is an ellipsis.
</p>
<dl>

<dt><i>node</i> (ast.AST)</dt>
<dd>
reference to the node to check
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
flag indicating an ellipsis
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="isNameConstant" ID="isNameConstant"></a>
<h2>isNameConstant</h2>
<b>isNameConstant</b>(<i>node</i>)

<p>
    Function to check that a node is a name constant.
</p>
<dl>

<dt><i>node</i> (ast.AST)</dt>
<dd>
reference to the node to check
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
flag indicating a name constant
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="isNumber" ID="isNumber"></a>
<h2>isNumber</h2>
<b>isNumber</b>(<i>node</i>)

<p>
    Function to check that a node is a number.
</p>
<dl>

<dt><i>node</i> (ast.AST)</dt>
<dd>
reference to the node to check
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
flag indicating a number
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="isString" ID="isString"></a>
<h2>isString</h2>
<b>isString</b>(<i>node</i>)

<p>
    Function to check that a node is a string.
</p>
<dl>

<dt><i>node</i> (ast.AST)</dt>
<dd>
reference to the node to check
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
flag indicating a string
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>

eric ide

mercurial