973 paramList.append([paramName, "", [parts[2]]]) |
973 paramList.append([paramName, "", [parts[2]]]) |
974 except IndexError: |
974 except IndexError: |
975 paramList.append([paramName, "", []]) |
975 paramList.append([paramName, "", []]) |
976 lastItem = paramList[-1][2] |
976 lastItem = paramList[-1][2] |
977 elif desc.startswith("@type"): |
977 elif desc.startswith("@type"): |
|
978 parts = desc.split(None, 1) |
978 if lastTag not in ["@param", "@keyparam"]: |
979 if lastTag not in ["@param", "@keyparam"]: |
979 raise TagError( |
980 raise TagError( |
980 "{0} line must be preceded by a parameter line\n" |
981 "{0} line must be preceded by a parameter line\n" |
981 .format(parts[0])) |
982 .format(parts[0])) |
982 inTagSection = True |
983 inTagSection = True |
983 parts = desc.split(None, 1) |
|
984 lastTag = parts[0] |
984 lastTag = parts[0] |
985 if len(parts) < 2: |
985 if len(parts) < 2: |
986 raise TagError( |
986 raise TagError( |
987 "Wrong format in {0} line.\n".format(parts[0])) |
987 "Wrong format in {0} line.\n".format(parts[0])) |
988 paramList[-1][1] = parts[1] |
988 paramList[-1][1] = parts[1] |
1010 raise TagError( |
1010 raise TagError( |
1011 "Wrong format in {0} line.\n".format(parts[0])) |
1011 "Wrong format in {0} line.\n".format(parts[0])) |
1012 returns = [parts[1]] |
1012 returns = [parts[1]] |
1013 lastItem = returns |
1013 lastItem = returns |
1014 elif desc.startswith("@rtype"): |
1014 elif desc.startswith("@rtype"): |
|
1015 parts = desc.split(None, 1) |
|
1016 if lastTag not in ["@return", "@ireturn"]: |
|
1017 raise TagError( |
|
1018 "{0} line must be preceded by a return line\n" |
|
1019 .format(parts[0])) |
1015 inTagSection = True |
1020 inTagSection = True |
1016 parts = desc.split(None, 1) |
|
1017 lastTag = parts[0] |
1021 lastTag = parts[0] |
1018 if len(parts) < 2: |
1022 if len(parts) < 2: |
1019 raise TagError( |
1023 raise TagError( |
1020 "Wrong format in {0} line.\n".format(parts[0])) |
1024 "Wrong format in {0} line.\n".format(parts[0])) |
1021 returnTypes = [parts[1]] |
1025 returnTypes = [parts[1]] |