It's possible for yapf to format a continuation line so that the indentation is the same as the following line. (This is similar to #21.)
Given:
class Foo(object):
def __init__(
self, aaaaaaaaaaaa, bbbbbbbbbbbbbbbbbbb, ccccccccccccccccc,
ddddddddddd):
self.aaaaaaaaaaaa = aaaaaaaaaaaa
yapf 0.5.0 produces:
class Foo(object):
def __init__(
self, aaaaaaaaaaaa, bbbbbbbbbbbbbbbbbbb, ccccccccccccccccc,
ddddddddddd):
self.aaaaaaaaaaaa = aaaaaaaaaaaa
$ pep8 foo.py
bar.py:4:5: E125 continuation line with same indent as next logical line
Interestingly, unwrapping the def line first causes yapf to produce the following, which is fine:
class Foo(object):
def __init__(self, aaaaaaaaaaaa, bbbbbbbbbbbbbbbbbbb, ccccccccccccccccc,
ddddddddddd):
self.aaaaaaaaaaaa = aaaaaaaaaaaa
It's possible for yapf to format a continuation line so that the indentation is the same as the following line. (This is similar to #21.)
Given:
yapf 0.5.0 produces:
Interestingly, unwrapping the
defline first causes yapf to produce the following, which is fine: