PCART  v1.4
Automated Repair of Python API Parameter Compatibility Issues
Public Member Functions | List of all members
Import Class Reference

Import and ImportFrom node visitor Import和ImportFrom节点遍历器 More...

Inheritance diagram for Import:
[legend]
Collaboration diagram for Import:
[legend]

Public Member Functions

def __init__ (self)
 Initialize the module name dictionary 初始化模块名字典 More...
 
def get_md_name (self)
 Return the module name dictionary 返回模块名字典 More...
 
def visit_Import (self, node)
 Visit an Import node and record alias-to-name mappings 访问Import节点,记录别名到模块名的映射 More...
 
def visit_ImportFrom (self, node)
 Visit an ImportFrom node and record alias-to-qualified-name mappings 访问ImportFrom节点,记录别名到完整限定名的映射 More...
 

Detailed Description

Import and ImportFrom node visitor Import和ImportFrom节点遍历器

Inherits from ast.NodeVisitor

Definition at line 21 of file extractCall.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)

Initialize the module name dictionary 初始化模块名字典

Definition at line 24 of file extractCall.py.

Member Function Documentation

◆ get_md_name()

def get_md_name (   self)

Return the module name dictionary 返回模块名字典

Returns
dict mapping alias to full module name

Definition at line 30 of file extractCall.py.

◆ visit_Import()

def visit_Import (   self,
  node 
)

Visit an Import node and record alias-to-name mappings 访问Import节点,记录别名到模块名的映射

Parameters
nodeThe Import AST node
Returns
None

Definition at line 37 of file extractCall.py.

◆ visit_ImportFrom()

def visit_ImportFrom (   self,
  node 
)

Visit an ImportFrom node and record alias-to-qualified-name mappings 访问ImportFrom节点,记录别名到完整限定名的映射

Parameters
nodeThe ImportFrom AST node
Returns
None

Definition at line 49 of file extractCall.py.


The documentation for this class was generated from the following file: