Skip to content

boolean-positional-value-in-call (FBT003) - don't warn when function name starts with set_ and only takes one argument #8923

@DetachHead

Description

@DetachHead

functions like these should not report the error imo, since the meaning of the bool is self explanatory, which is often the case when the functin starts with set_:

def set_enabled(enabled: bool):
    ...

set_enabled(True) # self explanatory
set_enabled(enabled=True) # unnecessary/redundant

Metadata

Metadata

Assignees

Labels

ruleImplementing or modifying a lint rule

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions