Skip to content

Files

Latest commit

 

History

History
23 lines (15 loc) · 463 Bytes

pointless-statement.md

File metadata and controls

23 lines (15 loc) · 463 Bytes

Pattern: Pointless statement

Issue: -

Description

Used when a statement doesn't have (or at least seems to) any effect. This may lead to confusion by readers, side effects and increased code size. Update or remove such code to resolve this issue.

Example of incorrect code:

def test_method():
    __revision__ <= 1  # [pointless-statement]
    return "42"

Example of correct code:

def test_method():
    return "42"