feat: support line ending #205
Annotations
3 errors
Run bun test test_bun
at WASM ([wasm code])
at WASM ([wasm code])
at WASM ([wasm code])
at WASM ([wasm code])
at WASM ([wasm code])
at WASM ([wasm code])
at WASM ([wasm code])
at WASM ([wasm code])
at WASM ([wasm code])
at WASM ([wasm code])
|
Run bun test test_bun:
crates/ruff_fmt/test_bun/bun.spec.ts#L45
Expected: "x = \"This is a really long string that can't possibly be expected to fit all together on one line. In fact it may even take up three or more lines... like four or five... but probably just three.\"\n\nx += \"This is a really long string that can't possibly be expected to fit all together on one line. In fact it may even take up three or more lines... like four or five... but probably just three.\"\n\ny = \"Short string\"\n\nprint(\n \"This is a really long string inside of a print statement with extra arguments attached at the end of it.\",\n x,\n y,\n z,\n)\n\nprint(\n \"This is a really long string inside of a print statement with no extra arguments attached at the end of it.\"\n)\n\nD1 = {\n \"The First\": \"This is a really long string that can't possibly be expected to fit all together on one line. Also it is inside a dictionary, so formatting is more difficult.\",\n \"The Second\": \"This is another really really (not really) long string that also can't be expected to fit on one line and is, like the other string, inside a dictionary.\",\n}\n\nD2 = {\n 1.0: \"This is a really long string that can't possibly be expected to fit all together on one line. Also it is inside a dictionary, so formatting is more difficult.\",\n 2.0: \"This is another really really (not really) long string that also can't be expected to fit on one line and is, like the other string, inside a dictionary.\",\n}\n\nD3 = {\n x: \"This is a really long string that can't possibly be expected to fit all together on one line. Also it is inside a dictionary, so formatting is more difficult.\",\n y: \"This is another really really (not really) long string that also can't be expected to fit on one line and is, like the other string, inside a dictionary.\",\n}\n\nD4 = {\n \"A long and ridiculous {}\".format(\n string_key\n ): \"This is a really really really long string that has to go i,side of a dictionary. It is soooo bad.\",\n some_func(\n \"calling\", \"some\", \"stuff\"\n ): \"This is a really really really long string that has to go inside of a dictionary. It is {soooo} bad (#{x}).\".format(\n sooo=\"soooo\", x=2\n ),\n \"A %s %s\"\n % (\n \"formatted\",\n \"string\",\n ): \"This is a really really really long string that has to go inside of a dictionary. It is %s bad (#%d).\"\n % (\"soooo\", 2),\n}\n\nfunc_with_keywords(\n my_arg,\n my_kwarg=\"Long keyword strings also need to be wrapped, but they will probably need to be handled a little bit differently.\",\n)\n\nbad_split1 = (\n \"But what should happen when code has already been formatted but in the wrong way? Like\"\n \" with a space at the end instead of the beginning. Or what about when it is split too soon?\"\n)\n\nbad_split2 = (\n \"But what should happen when code has already \"\n \"been formatted but in the wrong way? Like \"\n \"with a space at the end instead of the \"\n \"beginning. Or what about when it is split too \"\n \"soon? In the case of a split that is too \"\n \"short, black will try to honer the custom \"\n \"split.\"\n)\n\nbad_split3 = (\n \"What if we have inline comments on \" # First Comment\n \"each line of a bad split? In that \" # Second Comment\n \"case, we should just leave it alone.\" # Third Comment\n)\n\nbad_split_func1(\n \"But what should happen when code has already \"\n \"been formatted but in the wrong way? Like \"\n \"with a space at the end instead of the \"\n \"beginning. Or what about when it is split too \"\n \"soon? In the case of a split that is too \"\n \"short, black will try to honer the custom \"\n \"split.\",\n xxx,\n yyy,\n zzz,\n)\n\nbad_split_func2(\n xxx,\n yyy,\n zzz,\n long_string_kwarg=\"But what should happen when code has already been formatted but in the wrong way? Like \"\n \"with a space at the end instead of the beginning. Or what about when it is split too \"\n \"soon?\",\n)\n\nbad_split_func3(\n (\n \"But what should happen
|
Run bun test test_bun
Process completed with exit code 1.
|
Loading