Module implementing a checker for documentation string conventions.
None |
DocStyleChecker | Class implementing a checker for documentation string conventions. |
DocStyleContext | Class implementing the source context. |
None |
Class implementing a checker for documentation string conventions.
Codes |
None |
DocStyleChecker | Constructor |
__checkBackslashes | Private method to check, that all docstrings containing backslashes are surrounded by raw triple double quotes. |
__checkBlankAfterLastParagraph | Private method to check, that the last paragraph of docstrings is followed by a blank line. |
__checkBlankAfterSummary | Private method to check, that docstring summaries are followed by a blank line. |
__checkBlankBeforeAndAfterClass | Private method to check, that class docstrings have one blank line around them. |
__checkClassDocstring | Private method to check, that all public functions and methods have a docstring. |
__checkEndsWithPeriod | Private method to check, that docstring summaries end with a period. |
__checkEricBlankAfterSummary | Private method to check, that docstring summaries are followed by a blank line. |
__checkEricEndsWithPeriod | Private method to check, that docstring summaries end with a period. |
__checkEricException | Private method to check, that docstrings contain an @exception line if they raise an exception and don't otherwise. |
__checkEricFunctionArguments | Private method to check, that docstrings contain an @param and/or @keyparam line for each argument. |
__checkEricNBlankAfterLastParagraph | Private method to check, that the last paragraph of docstrings is not followed by a blank line. |
__checkEricNoBlankBeforeAndAfterClassOrFunction | Private method to check, that class and function/method docstrings have no blank line around them. |
__checkEricQuotesOnSeparateLines | Private method to check, that leading and trailing quotes are on a line by themselves. |
__checkEricReturn | Private method to check, that docstrings contain an @return line if they return anything and don't otherwise. |
__checkEricSignal | Private method to check, that docstrings contain an @signal line if they define signals and don't otherwise. |
__checkEricSummary | Private method to check, that method docstring summaries start with specific words. |
__checkFunctionDocstring | Private method to check, that all public functions and methods have a docstring. |
__checkImperativeMood | Private method to check, that docstring summaries are in imperative mood. |
__checkIndent | Private method to check, that docstrings are properly indented. |
__checkModulesDocstrings | Private method to check, if the module has a docstring. |
__checkNoBlankLineBefore | Private method to check, that function/method docstrings are not preceded by a blank line. |
__checkNoSignature | Private method to check, that docstring summaries don't repeat the function's signature. |
__checkOneLiner | Private method to check, that one-liner docstrings fit on one line with quotes. |
__checkReturnType | Private method to check, that docstrings mention the return value type. |
__checkSummary | Private method to check, that docstring summaries contain some text. |
__checkTripleDoubleQuotes | Private method to check, that all docstrings are surrounded by triple double quotes. |
__error | Private method to record an issue. |
__getArgNames | Private method to get the argument names of a function node. |
__getSummaryLine | Private method to extract the summary line. |
__getSummaryLines | Private method to extract the summary lines. |
__ignoreCode | Private method to check if the error code should be ignored. |
__parseClasses | Private method to extract top-level classes. |
__parseContexts | Private method to extract a context from the source. |
__parseDocstring | Private method to extract a docstring given `def` or `class` source. |
__parseFunctions | Private method to extract top-level functions. |
__parseMethods | Private method to extract methods of all classes. |
__parseModuleDocstring | Private method to extract a docstring given a module source. |
__parseTopLevel | Private method to extract top-level functions or classes. |
__readline | Private method to get the next line from the source. |
__reportInvalidSyntax | Private method to report a syntax error. |
__resetReadline | Private method to reset the internal readline function. |
__skipIndentedBlock | Private method to skip over an indented block of source code. |
run | Public method to check the given source for violations of doc string conventions. |
None |
Constructor
Private method to check, that all docstrings containing backslashes are surrounded by raw triple double quotes.
Private method to check, that the last paragraph of docstrings is followed by a blank line.
Private method to check, that docstring summaries are followed by a blank line.
Private method to check, that class docstrings have one blank line around them.
Private method to check, that all public functions and methods have a docstring.
Private method to check, that docstring summaries end with a period.
Private method to check, that docstring summaries are followed by a blank line.
Private method to check, that docstring summaries end with a period.
Private method to check, that docstrings contain an @exception line if they raise an exception and don't otherwise.
Note: This method also checks the raised and documented exceptions for completeness (i.e. raised exceptions that are not documented or documented exceptions that are not raised)
Private method to check, that docstrings contain an @param and/or @keyparam line for each argument.
Private method to check, that the last paragraph of docstrings is not followed by a blank line.
Private method to check, that class and function/method docstrings have no blank line around them.
Private method to check, that leading and trailing quotes are on a line by themselves.
Private method to check, that docstrings contain an @return line if they return anything and don't otherwise.
Private method to check, that docstrings contain an @signal line if they define signals and don't otherwise.
Note: This method also checks the defined and documented signals for completeness (i.e. defined signals that are not documented or documented signals that are not defined)
Private method to check, that method docstring summaries start with specific words.
Private method to check, that all public functions and methods have a docstring.
Private method to check, that docstring summaries are in imperative mood.
Private method to check, that docstrings are properly indented.
Private method to check, if the module has a docstring.
Private method to check, that function/method docstrings are not preceded by a blank line.
Private method to check, that docstring summaries don't repeat the function's signature.
Private method to check, that one-liner docstrings fit on one line with quotes.
Private method to check, that docstrings mention the return value type.
Private method to check, that docstring summaries contain some text.
Private method to check, that all docstrings are surrounded by triple double quotes.
Private method to record an issue.
Private method to get the argument names of a function node.
Private method to extract the summary line.
Private method to extract the summary lines.
Private method to check if the error code should be ignored.
Private method to extract top-level classes.
Private method to extract a context from the source.
Private method to extract a docstring given `def` or `class` source.
Private method to extract top-level functions.
Private method to extract methods of all classes.
Private method to extract a docstring given a module source.
Private method to extract top-level functions or classes.
Private method to get the next line from the source.
Private method to report a syntax error.
Private method to reset the internal readline function.
Private method to skip over an indented block of source code.
Public method to check the given source for violations of doc string conventions.
Class implementing the source context.
None |
None |
DocStyleContext | Constructor |
contextType | Public method to get the context type. |
end | Public method to get the end line number. |
indent | Public method to get the indentation of the first line. |
setSpecial | Public method to set a special attribute for the context. |
source | Public method to get the source. |
special | Public method to get the special context attribute string. |
ssource | Public method to get the joined source lines. |
start | Public method to get the start line number. |
None |
Constructor
Public method to get the context type.
Public method to get the end line number.
Public method to get the indentation of the first line.
Public method to set a special attribute for the context.
Public method to get the source.
Public method to get the special context attribute string.
Public method to get the joined source lines.
Public method to get the start line number.