Module implementing a checker for function type annotations.
None |
AnnotationsChecker | Class implementing a checker for function type annotations. |
FunctionVisitor | Class implementing a node visitor to check function annotations. |
getAnnotationComplexity | Function to determine the annotation complexity. |
hasTypeAnnotations | Function to check for type annotations. |
Class implementing a checker for function type annotations.
Codes |
None |
AnnotationsChecker | Constructor |
__checkAnnotationComplexity | Private method to check the type annotation complexity. |
__checkAnnotationsCoverage | Private method to check for function annotation coverage. |
__checkFunctionAnnotations | Private method to check for function annotation issues. |
__error | Private method to record an issue. |
__generateTree | Private method to generate an AST for our source. |
__ignoreCode | Private method to check if the message code should be ignored. |
__reportInvalidSyntax | Private method to report a syntax error. |
run | Public method to check the given source against annotation issues. |
None |
Constructor
Private method to check the type annotation complexity.
Private method to check for function annotation coverage.
Private method to check for function annotation issues.
Private method to record an issue.
Private method to generate an AST for our source.
Private method to check if the message code should be ignored.
Private method to report a syntax error.
Public method to check the given source against annotation issues.
Class implementing a node visitor to check function annotations.
Note: this class is modelled after flake8-annotations checker.
None |
None |
FunctionVisitor | Constructor |
__checkFunctionNode | Private method to check an individual function definition node. |
__classifyArgumentError | Private method to classify and record an argument annotation issue. |
__classifyReturnError | Private method to classify and record a return annotation issue. |
visit_AsyncFunctionDef | Public method to handle an async function or method definition. |
visit_ClassDef | Public method to handle class definitions. |
visit_FunctionDef | Public method to handle a function or method definition. |
None |
Constructor
Private method to check an individual function definition node.
Private method to classify and record an argument annotation issue.
Private method to classify and record a return annotation issue.
Public method to handle an async function or method definition.
Public method to handle class definitions.
Public method to handle a function or method definition.
Function to determine the annotation complexity.
Function to check for type annotations.