Module implementing a checker for function type annotations.
None |
AnnotationsChecker | Class implementing a checker for function type annotations. |
None |
Class implementing a checker for function type annotations.
Codes |
None |
AnnotationsChecker | Constructor |
__argumentErrorClassifier | Private method to classify an argument type annotation issue. |
__checkAnnotationComplexity | Private method to check the type annotation complexity. |
__checkAnnotationPep604 | Private method to check the use of typing.Union. |
__checkAnnotationsCoverage | Private method to check for function annotation coverage. |
__checkAnnotationsFuture | Private method to check the use of __future__ and typing imports. |
__checkDeprecatedTypingSymbols | Private method to check the use of deprecated 'typing' symbols. |
__checkFunctionAnnotations | Private method to check for function annotation issues. |
__classifyError | Private method to classify the missing type annotation based on the Function & Argument metadata. |
__error | Private method to record an issue. |
__getAnnotationComplexity | Private method to determine the annotation complexity. |
__getAnnotationLength | Private method to determine the annotation length. |
__hasTypeAnnotations | Private method to check for type annotations. |
__ignoreCode | Private method to check if the message code should be ignored. |
__returnErrorClassifier | Private method to classify a return type annotation issue. |
run | Public method to check the given source against annotation issues. |
None |
Constructor
Private method to classify an argument type annotation issue.
Private method to check the type annotation complexity.
Private method to check the use of typing.Union.
Private method to check for function annotation coverage.
Private method to check the use of __future__ and typing imports.
Private method to check the use of deprecated 'typing' symbols.
Private method to check for function annotation issues.
Private method to classify the missing type annotation based on the Function & Argument metadata.
For the currently defined rules & program flow, the assumption can be made that an argument passed to this method will match a linting error, and will only match a single linting error
This function provides an initial classificaton, then passes relevant attributes to cached helper function(s).
Private method to record an issue.
Private method to determine the annotation complexity.
Private method to determine the annotation length.
Private method to check for type annotations.
Private method to check if the message code should be ignored.
Private method to classify a return type annotation issue.
Public method to check the given source against annotation issues.