提交 f713e6a0 编写于 作者: Z zt

增加参数,返回值对应的文档描述,修改代码格式,

上级 e857a6a9
......@@ -19,6 +19,7 @@ class BuildDepend():
search_db:Query an instance of a database class
result_dict:A dictionary to store the data that needs to be echoed
source_dict:A dictionary to store the searched source code package name
not_found_components: Contain the package not found components
"""
def __init__(self, pkg_name_list, db_list, self_build=0, history_dict=None):
......@@ -45,6 +46,7 @@ class BuildDepend():
ResponseCode: response code
result_dict: Dictionary of query results
source_dict: Dictionary of source code package
not_found_components: Set of package not found components
Raises:
"""
if not self.search_db.db_object_dict:
......@@ -67,7 +69,7 @@ class BuildDepend():
# The status code is not the final display status code
return ResponseCode.SUCCESS, self.result_dict, self.source_dict, self.not_found_components
return ResponseCode.PARAM_ERROR, None, None,set()
return ResponseCode.PARAM_ERROR, None, None, set()
def build_depend(self, pkg_list):
"""
......
......@@ -20,6 +20,7 @@ class InstallDepend():
__search_list: Contain the binary packages searched in the next loop
binary_dict: Contain all the binary packages info and operation
__search_db: A object of database which would be connected
not_found_components: Contain the package not found components
changeLog:
"""
#pylint: disable = too-few-public-methods
......@@ -52,6 +53,7 @@ class InstallDepend():
'install'
]
]}
not_found_components:Set of package not found components
Raises:
"""
if not self.__search_db.db_object_dict:
......
......@@ -58,7 +58,8 @@ class SearchDB():
Args:
binary_list: a list of binary package name
Returns:
install depend list
list:install depend list
set:package not found components
Raises:
"""
result_list = []
......@@ -181,6 +182,7 @@ class SearchDB():
Args:
source_name_list: search package's name, database preority list
Returns:
response code
result_list: subpack tuple
Raises:
AttributeError: The object does not have this property
......@@ -390,7 +392,7 @@ class SearchDB():
all source pkg build depend list
structure :[(search_name,source_name,bin_name,bin_version,db_name,search_version),
(search_name,source_name,bin_name,bin_version,db_name,search_version),]
set: package not found components name set
Raises:
AttributeError: The object does not have this property
SQLAlchemyError: sqlalchemy error
......
......@@ -33,6 +33,7 @@ class SelfDepend():
search_subpack_list: Contain the source packages searched subpack in the next loop
withsubpack: withsubpack
search_db: A object of database which would be connected
not_found_components: Contain the package not found components
"""
def __init__(self, db_list):
"""
......@@ -60,6 +61,7 @@ class SelfDepend():
Returns:
binary_dict.dictionary: Contain all the binary packages info after searching
source_dicts.dictionary: Contain all the source packages info after searching
not_found_components :Set of package not found components
Raises:
"""
if not self.search_db.db_object_dict:
......
......@@ -215,6 +215,7 @@ class PkgshipCommand(BaseCommand):
Description: Parsing package data with dependencies
Args:
response_data: http request response content
params: Parameters passed in on the command line
Returns:
Summarized data table
Raises:
......@@ -825,6 +826,7 @@ class InstallDepCommand(PkgshipCommand):
Description: Parse the corresponding data of the package
Args:
response_data: http response data
params: Parameters passed in on the command line
Returns:
Raises:
......@@ -1050,6 +1052,7 @@ class SelfBuildCommand(PkgshipCommand):
Description: Parse the corresponding data of the package
Args:
response_data: http response data
params: Parameters passed in on the command line
Returns:
Summarized data table
Raises:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册