typedargs.lint module¶
A pylint plugin that checks for errors in typedargs declarations.
This should be run using pylint in the following way:
`
pylint --load-plugins typedargs.lint <path to source files>
`
It will return errors if there are problems with annotated functions or if the docstring for an @docannotate function is not correctly formatted.
Reference¶
-
class
typedargs.lint.
AnnotationList
(params, returns, use_doc)¶ Bases:
tuple
-
params
¶ Alias for field number 0
-
returns
¶ Alias for field number 1
-
use_doc
¶ Alias for field number 2
-
-
class
typedargs.lint.
AnnotatedFunctionChecker
(linter=None)[source]¶ Bases:
pylint.checkers.base_checker.BaseChecker
-
priority
= -1¶
-
-
class
typedargs.lint.
DocannotationChecker
(linter=None)[source]¶ Bases:
typedargs.lint.AnnotatedFunctionChecker
-
name
= 'typedargs-annotation'¶
-
msgs
= {'W6701': ('Doc-annotation parameter or return does not correspond to a known type', 'typedargs-unknown-type', 'All types annotated using typedargs should resolve to known types.')}¶
-