Plugins/CheckerPlugins/CodeStyleChecker/DocStyleChecker.py

changeset 6051
6e09a9a73cb7
parent 6048
82ad8ec9548c
child 6170
2bcf6e5637e7
equal deleted inserted replaced
6049:88eba84f184b 6051:6e09a9a73cb7
135 "D111", "D112", "D113", 135 "D111", "D112", "D113",
136 "D121", "D122", 136 "D121", "D122",
137 "D130", "D131", "D132", "D133", "D134", 137 "D130", "D131", "D132", "D133", "D134",
138 "D141", "D142", "D143", "D144", "D145", 138 "D141", "D142", "D143", "D144", "D145",
139 139
140 "D203", "D205", 140 "D203", "D205", "D206",
141 "D221", "D222", 141 "D221", "D222",
142 "D231", "D232", "D234", "D235", "D236", "D237", "D238", "D239", 142 "D231", "D232", "D234", "D235", "D236", "D237", "D238", "D239",
143 "D242", "D243", "D244", "D245", "D246", "D247", 143 "D242", "D243", "D244", "D245", "D246", "D247",
144 "D250", "D251", "D252", "D253", 144 "D250", "D251", "D252", "D253",
145 "D260", "D261", "D262", "D263", 145 "D260", "D261", "D262", "D263",
230 (self.__checkModulesDocstrings, ("D101",)), 230 (self.__checkModulesDocstrings, ("D101",)),
231 ], 231 ],
232 "functionDocstring": [ 232 "functionDocstring": [
233 ], 233 ],
234 "classDocstring": [ 234 "classDocstring": [
235 (self.__checkClassDocstring, ("D104", "D205")), 235 (self.__checkClassDocstring, ("D104", "D205", "D206")),
236 (self.__checkEricNoBlankBeforeAndAfterClassOrFunction, 236 (self.__checkEricNoBlankBeforeAndAfterClassOrFunction,
237 ("D242", "D243")), 237 ("D242", "D243")),
238 (self.__checkEricSignal, ("D260", "D261", "D262", "D263")), 238 (self.__checkEricSignal, ("D260", "D261", "D262", "D263")),
239 ], 239 ],
240 "methodDocstring": [ 240 "methodDocstring": [
748 748
749 docstring = docstringContext.ssource() 749 docstring = docstringContext.ssource()
750 if (not docstring or not docstring.strip() or 750 if (not docstring or not docstring.strip() or
751 not docstring.strip('\'"')): 751 not docstring.strip('\'"')):
752 self.__error(context.start(), 0, code) 752 self.__error(context.start(), 0, code)
753 return
754
755 if self.__docType == "eric" and \
756 docstring.strip('\'"').strip() == "Class documentation goes here.":
757 self.__error(context.start(), 0, "D206")
758 return
753 759
754 def __checkTripleDoubleQuotes(self, docstringContext, context): 760 def __checkTripleDoubleQuotes(self, docstringContext, context):
755 """ 761 """
756 Private method to check, that all docstrings are surrounded 762 Private method to check, that all docstrings are surrounded
757 by triple double quotes. 763 by triple double quotes.

eric ide

mercurial