Skip to content
#

formatter

Here are 1,144 public repositories matching this topic...

prettier
black
jack1142
jack1142 commented Jun 8, 2021

Describe the bug

"EOF in multi-line statement" error is shown to the user as the raw tuple it was returned as, rather than in a nicely formatted message.

To Reproduce

For example:

  1. Take this (invalid) file:
print(
  1. Run Black on it with no arguments
  2. See a message with the EOF error being shown as a raw tuple representation:
error: cannot format test
SimonWoodburyForget
SimonWoodburyForget commented Sep 28, 2021

If the subset of a variable name is "in" inside of the for-loop's for ... in section and requires formatting with a comment around the in-keyword, an invalid output is produced.

For this input:

fn main() {
    for variable_in_here /* ... */ in 0..1 {}
    for variable_in_here in /* ... */ 0..1 {}
    for variable_in_here
    in /* ... */ 0..1 {}
    for variable_in_here
  

Improve this page

Add a description, image, and links to the formatter topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the formatter topic, visit your repo's landing page and select "manage topics."

Learn more