Skip to content

Formatter: boolean operator should have equal level #6068

@konstin

Description

@konstin

We format and in one line and break the or, even though like black we should break both

black:

if not (
    isinstance(aaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbb)
    or numpy
    and isinstance(ccccccccccc, dddddd)
):
    pass

if not (
    isinstance(aaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbb)
    and numpy
    or isinstance(ccccccccccc, dddddd)
):
    pass

ours:

if not (
    isinstance(aaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbb)
    or numpy and isinstance(ccccccccccc, dddddd)
):
    pass

if not (
    isinstance(aaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbb) and numpy
    or isinstance(ccccccccccc, dddddd)
):
    pass

Metadata

Metadata

Assignees

Labels

formatterRelated to the formatter

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions