@@ -3087,7 +3087,21 @@ def arg_desc(self) -> List[Argument]:
30873087 refsyn = self .rec_find ("Refsynopsisdiv" )
30883088 # search by ID
30893089 arguments = None
3090- if refsyn is None :
3090+ if refsyn and "Variablelist" in refsyn .children_types :
3091+ for elem in refsyn :
3092+ if isinstance (elem , Variablelist ):
3093+ if arguments is None :
3094+ arguments = ArgumentList (
3095+ self .py_name , self .url , self ._terms , elem , self .args
3096+ )
3097+ else :
3098+ arguments += ArgumentList (
3099+ self .py_name , self .url , self ._terms , elem , self .args
3100+ )
3101+ if isinstance (elem , Paragraph ):
3102+ self ._is_paragraph_in_arg_desc = True
3103+
3104+ else :
30913105 refsections = self .find_all ("RefSection" )
30923106 for elem in refsections :
30933107 for child in elem :
@@ -3103,20 +3117,6 @@ def arg_desc(self) -> List[Argument]:
31033117 if isinstance (child , Paragraph ):
31043118 self ._is_paragraph_in_arg_desc = True
31053119
3106- else :
3107- for elem in refsyn :
3108- if isinstance (elem , Variablelist ):
3109- if arguments is None :
3110- arguments = ArgumentList (
3111- self .py_name , self .url , self ._terms , elem , self .args
3112- )
3113- else :
3114- arguments += ArgumentList (
3115- self .py_name , self .url , self ._terms , elem , self .args
3116- )
3117- if isinstance (elem , Paragraph ):
3118- self ._is_paragraph_in_arg_desc = True
3119-
31203120 arg_file = Path ("args.txt" )
31213121
31223122 if arguments is not None :
0 commit comments