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

API class for storing a single API definition API类,用于存储单个API的定义 More...

Public Member Functions

def __eq__ (self, other)
 Determine equality based on the parameters string 基于参数字符串判断两个API是否相同 More...
 
def __hash__ (self)
 Return the hash value based on the parameters string 基于参数字符串返回哈希值 More...
 
def __init__ (self)
 Initialize the API fields 初始化API字段 More...
 
def __repr__ (self)
 Return the full API string as the representation 返回完整API字符串作为对象表示形式 More...
 

Public Attributes

 full_item
 The full API string including name and parameters API完整字符串,包含名称和参数 More...
 
 name
 The API name without parameters API名称(不含参数) More...
 
 parameters
 List of Parameter objects 参数对象列表 More...
 
 parameters_string
 All parameters stored as a single string 所有参数保存为单个字符串 More...
 
 rType
 The return type annotation (if any) 返回值类型注释(如有) More...
 
 version
 The library version 库版本 More...
 

Detailed Description

API class for storing a single API definition API类,用于存储单个API的定义

Currently only considers changes to APIs with the same name. 暂时只考虑同名Api的变更情况

Definition at line 80 of file LibApi.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)

Initialize the API fields 初始化API字段

Definition at line 83 of file LibApi.py.

Member Function Documentation

◆ __eq__()

def __eq__ (   self,
  other 
)

Determine equality based on the parameters string 基于参数字符串判断两个API是否相同

list去重时,也会根据这个值的来去重

Parameters
otherThe API object to compare
Returns
True if both API objects have the same parameter string

Definition at line 115 of file LibApi.py.

◆ __hash__()

def __hash__ (   self)

Return the hash value based on the parameters string 基于参数字符串返回哈希值

Returns
Hash value of the API parameter string

Definition at line 106 of file LibApi.py.

◆ __repr__()

def __repr__ (   self)

Return the full API string as the representation 返回完整API字符串作为对象表示形式

When printing an instance, prints the full API string instead of the default object representation. 当打印一个类的时候,不会打印object,而是打印指定的字符串,即self.full_item

Returns
Full API string

Definition at line 124 of file LibApi.py.

Member Data Documentation

◆ full_item

full_item

The full API string including name and parameters API完整字符串,包含名称和参数

Definition at line 86 of file LibApi.py.

◆ name

name

The API name without parameters API名称(不含参数)

Definition at line 89 of file LibApi.py.

◆ parameters

parameters

List of Parameter objects 参数对象列表

Definition at line 92 of file LibApi.py.

◆ parameters_string

parameters_string

All parameters stored as a single string 所有参数保存为单个字符串

Definition at line 95 of file LibApi.py.

◆ rType

rType

The return type annotation (if any) 返回值类型注释(如有)

Definition at line 98 of file LibApi.py.

◆ version

version

The library version 库版本

Definition at line 101 of file LibApi.py.


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