Hacker News new | past | comments | ask | show | jobs | submit login

I'm saying this is a weird/below-average way to do it.

If this cannot fit in one line:

    foo(arg1, arg2)
My first choice would be:

    foo(
        arg1,
        arg2,
    )
Second choice would be:

    foo(
        arg1, arg2,
    )
While Black chooses:

    foo(
        arg1, arg2
    )
And made some unconvincing argument about it:

> Unnecessary trailing commas are removed if an expression fits in one line. This makes it 1% more likely that your line won't exceed the allotted line length limit. Moreover, in this scenario, if you added another argument to your call, you'd probably fit it in the same line anyway. That doesn't make diffs any larger.

Who cares about the 1% chance of not exceeding the line length limit, really?




I know and I completely agree. Maybe a kind of vote could be made on this kind of choices. But what would be really nice would be git "style lenses" : having different styles to edit or share.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: