question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiline format statements not converted

See original GitHub issue

Hi, another one for you. This format statement is not processed (ignored):

print("Finished: min time: {}, max_time: {}, ave time: {}".format(
    min_time,
    max_time,
    ave_time
))

It would be an obvious candidate for f-strification.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ikamenshcommented, Jul 16, 2019

fixed. Starting with 0.18, default is: multiline statements resulting in a line shorter than 80 characters are transformed. To change this limit, use flag flynt --line_length LINE_LENGTH, e.g. set it to 1000 to convert all reasonably applicable lines.

Add --no_multiline flag to convert single lines only.

1reaction
ikamenshcommented, Jul 11, 2019

I will reopen this to keep track of this feature

Read more comments on GitHub >

github_iconTop Results From Across the Web

In C can a long printf statement be broken up into multiple lines?
The idea is that the printf() conversion speficiers and the respective variables are all lined up "nicely" (for some values of "nicely").
Read more >
Pretty format YAML issue with multiline strings #47 - GitHub
But pretty format YAML converts it back to a single line and it's not pretty :) I can't use > because it adds...
Read more >
Strings and Characters — The Swift Programming Language ...
String interpolation is a way to construct a new String value from a mix of constants, variables, literals, and expressions by including their...
Read more >
YAML Multiline Strings
Find the right syntax for your YAML multiline strings. There are two types of formats that YAML supports for strings: block scalar and...
Read more >
Python - Multi-Line Statements - GeeksforGeeks
In this type of multi-line statement, we will be using the line continuation character (\) to split a statement into multiple lines. Example:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found