When using the Google docstring style, pydoclint has specific requirements for type annotations and default values, though these can be adjusted via configuration.
Type Annotations
By default, pydoclint requires argument types to be present in the docstring and checks for consistency in return and yield types.
To change this behavior, use these configuration options:
--arg-type-hints-in-docstring: Set to False to stop requiring types in Args.--check-return-types: Set to False to disable return type consistency checks.--check-yield-types: Set to False to disable yield type consistency checks.
Default Values
pydoclint rejects the Defaults to X prose style. You must use the (type, default=VALUE) format within the argument description.
# Accepted Google Style
"""
This is a function.
Args:
arg1 (int): Arg 1
arg2 (float): Arg 2
arg3 (Optional[Union[float, int, str]]): Arg 3
Returns:
int: Result
"""
# For default values, use this format:
"""
Args:
flag (int, default=None): The flag
"""