black icon indicating copy to clipboard operation
black copied to clipboard

Unnatural break due to overzealous omitting of optional parentheses

Open ambv opened this issue 7 years ago • 3 comments

Expected:

if A:
    if B:
        thread_items[0].some_attribute_access = (  # some comment in this place
            an_object.a_method_call()
        )

Actual:

if A:
    if B:
        thread_items[
           0
        ].some_attribute_access = (  # some comment in this place
            an_object.a_method_call()
        )

ambv avatar May 20 '18 16:05 ambv

Better example without comments:

        thread_items[0].some_attribute_access = (
            a_module.an_object.a_rather_longish_method_name_called()
        )

ambv avatar May 21 '18 21:05 ambv

this is still a problem with v22.3

actual:

        self.file_name = inbound_path.split("/")[-1].split(".")[
            0
        ]  # extract file name from path

expected:

        self.file_name = inbound_path.split("/")[-1].split(".")[0]  # extract file name from path

or

        self.file_name = inbound_path.split("/")[-1].split(".")[0] 
        # extract file name from path

DharamLietz-BO avatar Mar 30 '22 20:03 DharamLietz-BO

why has this not been resolved yet?

danielcjacobs avatar Nov 21 '22 20:11 danielcjacobs

2018 created 2019 2020 2021 2022 2023 today :D

vahidnia avatar Feb 10 '23 09:02 vahidnia