Skip to content

Files

Latest commit

 

History

History
21 lines (14 loc) · 388 Bytes

missing-parentheses-for-call-in-test.md

File metadata and controls

21 lines (14 loc) · 388 Bytes

Pattern: Missing parentheses for call in condition

Issue: -

Description

Emitted when a conditional statement (If or ternary if) seems to wrongly call a function due to missing parentheses.

Example of incorrect code:

if bool_function: # [missing-parentheses-for-call-in-test]
    pass

Example of correct code:

if not bool_function():
    pass