API Reference¶
In addition to the Flake8 plugin, the following public API is available
to allow other plugins to build on top of flake8-params.
Classes:
|
A Flake8 plugin which checks for mismatches between function signatures and docstring params. |
|
AST node visitor for identifying mismatches between function signatures and docstring params. |
Functions:
|
Check if signature and docstring parameters match, and return the flake8 error code if not. |
|
Returns an iterator of the dotted names of decorators for the given function. |
|
Extract arguments from the docstring. |
|
Extract arguments from the function signature. |
-
get_decorator_names(function)[source]¶ Returns an iterator of the dotted names of decorators for the given function.
- Parameters
function (
Union[AsyncFunctionDef,FunctionDef,ClassDef])- Return type
-
get_signature_args(function)[source]¶ Extract arguments from the function signature.
- Parameters
function (
Union[FunctionDef,AsyncFunctionDef])- Return type
..versionadded:: 0.2.0
-
check_params(signature_args, docstring_args, decorators)[source]¶ Check if signature and docstring parameters match, and return the flake8 error code if not.