Open vmstarchenko opened 7 years ago
I can confirm this with autopep8 0.9.1.
test = [xmod.yfunction(SomeModule.SomeClass, kwarg_1="cheese", kwarg_2=fish["sea.huge"], shop_closed = True),
xmod.yfunction(SomeModule.AnotherClassWithSomeLongName, kwarg_1="cheese", kwarg_2=fish["lake.too_small_to_keep_fishing"], shop_closed = True)]
$ autopep8 -a /tmp/test.py
test = [xmod.yfunction(
SomeModule.SomeClass, kwarg_1="cheese", kwarg_2=fish["sea.huge"], shop_closed=True),
xmod.yfunction(SomeModule.AnotherClassWithSomeLongName, kwarg_1="cheese", kwarg_2=fish["lake.too_small_to_keep_fishing"], shop_closed=True)]
I would expect code formatted like this:
test = [
xmod.yfunction(SomeModule.SomeClass,
kwarg_1="cheese",
kwarg_2=fish["sea.huge"],
shop_closed=True),
xmod.yfunction(SomeModule.AnotherClassWithSomeLongName,
kwarg_1="cheese",
kwarg_2=fish["lake.too_small_to_keep_fishing"],
shop_closed=True)
]
or even nicer:
test = [
xmod.yfunction(
SomeModule.SomeClass,
kwarg_1="cheese",
kwarg_2=fish["sea.huge"],
shop_closed=True),
xmod.yfunction(
SomeModule.AnotherClassWithSomeLongName,
kwarg_1="cheese",
kwarg_2=fish["lake.too_small_to_keep_fishing"],
shop_closed=True)
]
Position of newline symbols looks a bit strange. Furthermore in the second situation amount of spaces is not correct.