100 return self.__type |
100 return self.__type |
101 |
101 |
102 |
102 |
103 class DocStyleChecker(object): |
103 class DocStyleChecker(object): |
104 """ |
104 """ |
105 Class implementing a checker for PEP-257 documentation string conventions. |
105 Class implementing a checker for documentation string conventions. |
106 """ |
106 """ |
107 Codes = [ |
107 Codes = [ |
108 "D101", "D102", "D103", "D104", "D105", |
108 "D101", "D102", "D103", "D104", "D105", |
109 "D111", "D112", "D113", |
109 "D111", "D112", "D113", |
110 "D121", "D122", |
110 "D121", "D122", |
427 return self.__source[self.__lineNumber - 1] |
427 return self.__source[self.__lineNumber - 1] |
428 |
428 |
429 def run(self): |
429 def run(self): |
430 """ |
430 """ |
431 Public method to check the given source for violations of doc string |
431 Public method to check the given source for violations of doc string |
432 conventions according to PEP-257. |
432 conventions. |
433 """ |
433 """ |
434 if not self.__source or not self.__filename: |
434 if not self.__source or not self.__filename: |
435 # don't do anything, if essential data is missing |
435 # don't do anything, if essential data is missing |
436 return |
436 return |
437 |
437 |