Skip to content

WPS504: triggered with multiple conditions #2617

@Dreamsorcerer

Description

@Dreamsorcerer

What's wrong

Code like this seems to trigger a violation:

if not this():
    ...
elif not that():
    ...
else:
    ...

How it should be

No violation. It would be awkward to rewrite the code without negations, as it would require either calculating the conditions multiple times or pre-calculating the conditions into variables beforehand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions