DocumentationTools/ModuleDocumentor.py

changeset 2953
703452a2876f
parent 2401
4f428de32b69
child 2956
615dbd8a696a
equal deleted inserted replaced
2952:94fc661a54a2 2953:703452a2876f
48 48
49 class TagError(Exception): 49 class TagError(Exception):
50 """ 50 """
51 Exception class raised, if an invalid documentation tag was found. 51 Exception class raised, if an invalid documentation tag was found.
52 """ 52 """
53 pass
53 54
54 55
55 class ModuleDocument(object): 56 class ModuleDocument(object):
56 """ 57 """
57 Class implementing the builtin documentation generator. 58 Class implementing the builtin documentation generator.
687 def __checkDeprecated(self, descr): 688 def __checkDeprecated(self, descr):
688 """ 689 """
689 Private method to check, if the object to be documented contains a 690 Private method to check, if the object to be documented contains a
690 deprecated flag. 691 deprecated flag.
691 692
692 @param desc The documentation string. (string) 693 @param descr documentation string (string)
693 @return Flag indicating the deprecation status. (boolean) 694 @return flag indicating the deprecation status (boolean)
694 """ 695 """
695 dlist = descr.splitlines() 696 dlist = descr.splitlines()
696 for desc in dlist: 697 for desc in dlist:
697 desc = desc.strip() 698 desc = desc.strip()
698 if desc.startswith("@deprecated"): 699 if desc.startswith("@deprecated"):
817 """ 818 """
818 Private method to process inline tags. 819 Private method to process inline tags.
819 820
820 @param desc One line of the description (string) 821 @param desc One line of the description (string)
821 @return processed line with inline tags expanded (string) 822 @return processed line with inline tags expanded (string)
823 @exception TagError raised to indicate an invalid tag
822 """ 824 """
823 start = desc.find('{@') 825 start = desc.find('{@')
824 while start != -1: 826 while start != -1:
825 stop = desc.find('}', start + 2) 827 stop = desc.find('}', start + 2)
826 if stop == -1: 828 if stop == -1:

eric ide

mercurial