876 del dlist[0] |
876 del dlist[0] |
877 for ditem in dlist: |
877 for ditem in dlist: |
878 ditem = self.__processInlineTags(ditem) |
878 ditem = self.__processInlineTags(ditem) |
879 desc = ditem.strip() |
879 desc = ditem.strip() |
880 if desc: |
880 if desc: |
881 if desc.startswith("@param") or desc.startswith("@keyparam"): |
881 if desc.startswith(("@param", "@keyparam")): |
882 inTagSection = True |
882 inTagSection = True |
883 parts = desc.split(None, 2) |
883 parts = desc.split(None, 2) |
884 if len(parts) < 2: |
884 if len(parts) < 2: |
885 raise TagError("Wrong format in {0} line.\n".format(parts[0])) |
885 raise TagError("Wrong format in {0} line.\n".format(parts[0])) |
886 paramName = parts[1] |
886 paramName = parts[1] |
889 try: |
889 try: |
890 paramList.append([paramName, [parts[2]]]) |
890 paramList.append([paramName, [parts[2]]]) |
891 except IndexError: |
891 except IndexError: |
892 paramList.append([paramName, []]) |
892 paramList.append([paramName, []]) |
893 lastItem = paramList[-1][1] |
893 lastItem = paramList[-1][1] |
894 elif desc.startswith("@return"): |
894 elif desc.startswith(("@return", "@ireturn")): |
895 inTagSection = True |
895 inTagSection = True |
896 parts = desc.split(None, 1) |
896 parts = desc.split(None, 1) |
897 if len(parts) < 2: |
897 if len(parts) < 2: |
898 raise TagError("Wrong format in {0} line.\n".format(parts[0])) |
898 raise TagError("Wrong format in {0} line.\n".format(parts[0])) |
899 returns = [parts[1]] |
899 returns = [parts[1]] |
900 lastItem = returns |
900 lastItem = returns |
901 elif desc.startswith("@exception") or \ |
901 elif desc.startswith(("@exception", "@throws", "@raise")): |
902 desc.startswith("@throws") or \ |
|
903 desc.startswith("@raise"): |
|
904 inTagSection = True |
902 inTagSection = True |
905 parts = desc.split(None, 2) |
903 parts = desc.split(None, 2) |
906 if len(parts) < 2: |
904 if len(parts) < 2: |
907 raise TagError("Wrong format in {0} line.\n".format(parts[0])) |
905 raise TagError("Wrong format in {0} line.\n".format(parts[0])) |
908 excName = parts[1] |
906 excName = parts[1] |