Skip to content

wrap_comprehension_in: Black preview style removes parentheses that make code harder to read #4877

@hauntsaninja

Description

@hauntsaninja

For example:

         filtered_trait_instructions: list[str] = [
-            trait for trait in (traits_instructions or []) if trait
+            trait for trait in traits_instructions or [] if trait
         ]

There are ones involving await that are a little more arguable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions