missing-return-type-undocumented-public-function (ANN201)
Derived from the flake8-annotations linter.
Fix is sometimes available.
What it does
Checks that public functions and methods have return type annotations.
Why is this bad?
Type annotations are a good way to document the return types of functions. They also help catch bugs, when used alongside a type checker, by ensuring that the types of any returned values, and the types expected by callers, match expectation.
Example
Use instead:
Availability
Because this rule relies on the third-party typing_extensions
module for some Python versions,
its diagnostic will not be emitted, and no fix will be offered, if typing_extensions
imports
have been disabled by the lint.typing-extensions
linter option.