提交 f713e6a0 编写于 作者: Z zt

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

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