696 |
696 |
697 docstring = docstringContext.ssource() |
697 docstring = docstringContext.ssource() |
698 if (not docstring or not docstring.strip() or |
698 if (not docstring or not docstring.strip() or |
699 not docstring.strip('\'"')): |
699 not docstring.strip('\'"')): |
700 self.__error(context.start(), 0, "D101") |
700 self.__error(context.start(), 0, "D101") |
|
701 |
|
702 if self.__docType == "eric" and \ |
|
703 docstring.strip('\'"').strip() == "Module documentation goes here.": |
|
704 self.__error(docstringContext.end(), 0, "D201") |
|
705 return |
701 |
706 |
702 def __checkFunctionDocstring(self, docstringContext, context): |
707 def __checkFunctionDocstring(self, docstringContext, context): |
703 """ |
708 """ |
704 Private method to check, that all public functions and methods |
709 Private method to check, that all public functions and methods |
705 have a docstring. |
710 have a docstring. |
722 |
727 |
723 docstring = docstringContext.ssource() |
728 docstring = docstringContext.ssource() |
724 if (not docstring or not docstring.strip() or |
729 if (not docstring or not docstring.strip() or |
725 not docstring.strip('\'"')): |
730 not docstring.strip('\'"')): |
726 self.__error(context.start(), 0, code) |
731 self.__error(context.start(), 0, code) |
|
732 |
|
733 if self.__docType == "eric" and \ |
|
734 docstring.strip('\'"').strip() == \ |
|
735 "Function documentation goes here.": |
|
736 self.__error(docstringContext.end(), 0, "D202") |
|
737 return |
727 |
738 |
728 def __checkClassDocstring(self, docstringContext, context): |
739 def __checkClassDocstring(self, docstringContext, context): |
729 """ |
740 """ |
730 Private method to check, that all public functions and methods |
741 Private method to check, that all public functions and methods |
731 have a docstring. |
742 have a docstring. |
752 self.__error(context.start(), 0, code) |
763 self.__error(context.start(), 0, code) |
753 return |
764 return |
754 |
765 |
755 if self.__docType == "eric" and \ |
766 if self.__docType == "eric" and \ |
756 docstring.strip('\'"').strip() == "Class documentation goes here.": |
767 docstring.strip('\'"').strip() == "Class documentation goes here.": |
757 self.__error(context.start(), 0, "D206") |
768 self.__error(docstringContext.end(), 0, "D206") |
758 return |
769 return |
759 |
770 |
760 def __checkTripleDoubleQuotes(self, docstringContext, context): |
771 def __checkTripleDoubleQuotes(self, docstringContext, context): |
761 """ |
772 """ |
762 Private method to check, that all docstrings are surrounded |
773 Private method to check, that all docstrings are surrounded |