17
17
]
18
18
ARG_NAME_LIST_TO_IGNORE .extend (ARGS_OR_KWARGS_NAME_LIST )
19
19
20
- ADDITIONAL_INFO_PREFIX_LIST : List [str ]= [
20
+ ADDITIONAL_INFO_PREFIX_LIST : List [str ] = [
21
21
'.. versionadded' ,
22
22
'.. deprecated' ,
23
23
'.. versionchanged' ,
@@ -273,7 +273,7 @@ def get_func_overall_docstring(
273
273
docstring : str
274
274
Target docstring string.
275
275
"""
276
- match : Optional [re .Match ]= _get_func_match (
276
+ match : Optional [re .Match ] = _get_func_match (
277
277
py_module_str = py_module_str , func_name = func_name )
278
278
if match is None :
279
279
return ''
@@ -499,7 +499,8 @@ def get_docstring_param_info_list(docstring: str) -> List[Dict[str, str]]:
499
499
for splitted_param_doc in splitted_param_doc_list :
500
500
arg_name : str = _get_docstring_var_name (var_doc = splitted_param_doc )
501
501
type_name : str = _get_docstring_type_name (var_doc = splitted_param_doc )
502
- default_val : str = _get_docstring_default_value (var_doc = splitted_param_doc )
502
+ default_val : str = _get_docstring_default_value (
503
+ var_doc = splitted_param_doc )
503
504
description : str = _get_docstring_var_description (
504
505
var_doc = splitted_param_doc )
505
506
param_info_list = _append_param_info_to_list (
@@ -1063,7 +1064,7 @@ def _get_return_value_type_name_from_line(line_str: str) -> str:
1063
1064
return_value_type_name : str
1064
1065
Type name of return value.
1065
1066
"""
1066
- colon_exists : bool = ':' in line_str
1067
+ colon_exists : bool = ':' in line_str
1067
1068
if not colon_exists :
1068
1069
return_value_type_name : str = line_str .split (':' )[0 ]
1069
1070
else :
@@ -1073,7 +1074,7 @@ def _get_return_value_type_name_from_line(line_str: str) -> str:
1073
1074
1074
1075
1075
1076
def _get_return_value_docstring (
1076
- docstring : str , drop_additional_info : bool = True ) -> str :
1077
+ docstring : str , drop_additional_info : bool = True ) -> str :
1077
1078
"""
1078
1079
Get the string of docstring's return value part.
1079
1080
@@ -1113,7 +1114,7 @@ def _get_return_value_docstring(
1113
1114
if i < start_line_idx :
1114
1115
continue
1115
1116
last_line_idx = i
1116
- is_hyphen_line : bool = '----' in line_str
1117
+ is_hyphen_line : bool = '----' in line_str
1117
1118
if not is_hyphen_line :
1118
1119
continue
1119
1120
last_line_idx -= 2
@@ -1160,7 +1161,7 @@ def _hyphens_exists_next_line(
1160
1161
if len (line_splitted_list ) < next_line_idx + 1 :
1161
1162
return False
1162
1163
next_line_str : str = line_splitted_list [next_line_idx ]
1163
- is_in : bool = '----' in next_line_str
1164
+ is_in : bool = '----' in next_line_str
1164
1165
if is_in :
1165
1166
return True
1166
1167
return False
@@ -1306,7 +1307,7 @@ def _remove_nested_func_str(func_str: str, func_indent_num: int) -> str:
1306
1307
"""
1307
1308
1308
1309
removed_func_str : str = ''
1309
- line_splitted_list : List [str ]= func_str .split ('\n ' )
1310
+ line_splitted_list : List [str ] = func_str .split ('\n ' )
1310
1311
is_initial_function_appeared : bool = False
1311
1312
is_nested_func_line : bool = False
1312
1313
for line_str in line_splitted_list :
@@ -1402,7 +1403,7 @@ def get_optional_arg_name_list(docstring: str) -> List[str]:
1402
1403
return []
1403
1404
if not _parameters_exists_in_docstring (docstring = docstring ):
1404
1405
return []
1405
- splitted_param_doc_list : List [str ]= get_splitted_param_doc_list (
1406
+ splitted_param_doc_list : List [str ] = get_splitted_param_doc_list (
1406
1407
docstring = docstring )
1407
1408
optional_arg_name_list : List [str ] = []
1408
1409
for splitted_param_doc in splitted_param_doc_list :
@@ -1434,7 +1435,7 @@ def args_or_kwargs_str_in_param_name(param_arg_name: str) -> bool:
1434
1435
1435
1436
param_arg_name = param_arg_name .strip ()
1436
1437
for args_or_kwargs_str in ARGS_OR_KWARGS_NAME_LIST :
1437
- is_in : bool = args_or_kwargs_str in param_arg_name
1438
+ is_in : bool = args_or_kwargs_str in param_arg_name
1438
1439
if is_in :
1439
1440
return True
1440
1441
return False
0 commit comments