I have a code that calls with complex arguments, and some of them have conditional expression.
For example, the code below is the minimal exploit that show this issue:
For the exploit, I ran yapf with --style='{based_on_style=pep8, column_limit=50}' option.
Since the self._long_long_foo() exceeds the column limit, I thought that whole self._long_long_foo() should be wrapped after formatting, but it wasn't:
Hi!
I have a code that calls with complex arguments, and some of them have conditional expression. For example, the code below is the minimal exploit that show this issue:
For the exploit, I ran yapf with
--style='{based_on_style=pep8, column_limit=50}'
option.Since the
self._long_long_foo()
exceeds the column limit, I thought that wholeself._long_long_foo()
should be wrapped after formatting, but it wasn't:I think it is better to format not to wrap before the dot in
self.
, but to wrap beforeif
, so that the reformatted code should look at least like:or, for the best,
What do you think about this? It would be grateful if you consider this issue. Thank you!