When a parameter has a default value in Google style, we must specify “Defaults to xxx.” But if we don't specify it, pydoclint doesn't report anything.
For example, for this code, pydoclint doesn't report any problems:
def safe_digital_read(self, n: int = 5) -> bool:
"""Read the digital value multiple times and return the majority value.
Args:
n (int, optional): Number of reads to perform.
Returns:
bool: The majority value read from the pin.
"""
...
whereas it should be:
def safe_digital_read(self, n: int = 5) -> bool:
"""Read the digital value multiple times and return the majority value.
Args:
n (int, optional): Number of reads to perform. Defaults to 5.
Returns:
bool: The majority value read from the pin.
"""
...
When a parameter has a default value in Google style, we must specify “Defaults to xxx.” But if we don't specify it, pydoclint doesn't report anything.
For example, for this code, pydoclint doesn't report any problems:
whereas it should be: