Skip to content

Files

Latest commit

 

History

History
21 lines (14 loc) · 363 Bytes

missing-function-docstring.md

File metadata and controls

21 lines (14 loc) · 363 Bytes

Pattern: Missing function docstring

Issue: -

Description

Used when a function or method has no docstring. Some special methods like __init__ do not require a docstring.

Example of incorrect code:

def test(): # [missing-function-docstring]
    pass

Example of correct code:

def test():
    """It has a docstring."""