Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnatural break due to overzealous omitting of optional parentheses #236

Open
ambv opened this issue May 20, 2018 · 4 comments
Open

Unnatural break due to overzealous omitting of optional parentheses #236

ambv opened this issue May 20, 2018 · 4 comments
Labels
F: linebreak How should we split up lines? F: parentheses Too many parentheses, not enough parentheses, and so on. T: bug Something isn't working

Comments

@ambv
Copy link
Collaborator

ambv commented May 20, 2018

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 ambv added the T: bug Something isn't working label May 20, 2018
@ambv
Copy link
Collaborator Author

ambv commented May 21, 2018

Better example without comments:

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

@ambv ambv changed the title Extra break on indexing due to inline comment Unnatural break due to overzealous omitting of optional parentheses May 21, 2018
@ambv ambv added the stable label Mar 3, 2020
@JelleZijlstra JelleZijlstra added the F: parentheses Too many parentheses, not enough parentheses, and so on. label May 30, 2021
@JelleZijlstra JelleZijlstra added the F: linebreak How should we split up lines? label Jan 29, 2022
@DharamLietz-BO
Copy link

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

@danielcjacobs
Copy link

why has this not been resolved yet?

@vahidnia
Copy link

2018 created
2019
2020
2021
2022
2023 today
:D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: linebreak How should we split up lines? F: parentheses Too many parentheses, not enough parentheses, and so on. T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants