Bill Wendling

Results 83 comments of Bill Wendling

This is more-or-less intentional. The issue is that if we don't use the correct indentation within a "disabled" section, it could result in invalid code. For instance: ``` class SplitPenaltyTest(unittest.TestCase):...

The way to prevent your situation is to use the same indentation strategy. So if you have two space indentations, keep it two spaces instead of four.

I introduced a regression in these types of formatting between 0.28.0 and 0.29.0. I recently added a fix for it. Could you try HEAD to see if it's still failing...

I'm not sure I agree with this. A person who has a specific formatting in a comment probably did it that way for a reason. For instance, you could have...

@stevenleeS0ht This is most likely due to lib2to3 not being able to handle `:=` yet. We rely upon it for our parsing, and there's not much we can do until...

Sorry, I didn't see this. It looks like something to do with tabs not being added correctly.

What may help you get further towards the desired output is specifying `SPLIT_BEFORE_NAMED_ASSIGNS: False`. When I add that, it gives this: ``` $ python -m yapf --style='{based_on_style: pep8; SPLIT_BEFORE_NAMED_ASSIGNS: False}'...

The knob didn't seem to be useful anymore, because I could get the formatting you wanted here without it. Has it regressed?

I see what you mean. This will require a knob, though. But should be relatively straight-forward to implement.