Skip to content

chore(deps): update rust crate serde_json to v1.0.136 #510

chore(deps): update rust crate serde_json to v1.0.136

chore(deps): update rust crate serde_json to v1.0.136 #510

Triggered via push January 19, 2025 04:12
Status Failure
Total duration 1m 49s
Artifacts 1

test.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

13 errors and 7 warnings
Cargo test
Process completed with exit code 101.
error: expect(received).toBe(expected): crates/ruff_fmt/test_bun/bun.spec.ts#L23
Expected: "x = {\"a\": 37, \"b\": 42, \"c\": 927}\n\ny = \"hello world\"\nz = \"hello \" + \"world\"\na = \"hello {}\".format(\"world\")\n\n\nclass foo(object):\n def f(self):\n return 37 * -+2\n\n def g(self, x, y=42):\n return y\n\n\ndef f(a):\n return 37 + -+a[42 - x : y**3]\n" Received: "x = {\"a\": 37, \"b\": 42, \"c\": 927}\n\ny = \"hello \" \"world\"\nz = \"hello \" + \"world\"\na = \"hello {}\".format(\"world\")\n\n\nclass foo(object):\n def f(self):\n return 37 * -+2\n\n def g(self, x, y=42):\n return y\n\n\ndef f(a):\n return 37 + -+a[42 - x : y**3]\n" at <anonymous> (/home/runner/work/ruff_fmt/ruff_fmt/crates/ruff_fmt/test_bun/bun.spec.ts:23:24)
error: expect(received).toBe(expected): crates/ruff_fmt/test_bun/bun.spec.ts#L23
Expected: "\"single\"\n\n\"double\"\nr\"r single\"\nr\"r double\"\nf\"f single\"\nf\"f double\"\nrf\"fr single\"\nrf\"fr double\"\nrf\"rf single\"\nrf\"rf double\"\nb\"b single\"\nb\"b double\"\nrb\"rb single\"\nrb\"rb double\"\nrb\"br single\"\nrb\"br double\"\n\n\"\"\"single triple\"\"\"\n\"\"\"double triple\"\"\"\nr\"\"\"r single triple\"\"\"\nr\"\"\"r double triple\"\"\"\nf\"\"\"f single triple\"\"\"\nf\"\"\"f double triple\"\"\"\nrf\"\"\"fr single triple\"\"\"\nrf\"\"\"fr double triple\"\"\"\nrf\"\"\"rf single triple\"\"\"\nrf\"\"\"rf double triple\"\"\"\nb\"\"\"b single triple\"\"\"\nb\"\"\"b double triple\"\"\"\nrb\"\"\"rb single triple\"\"\"\nrb\"\"\"rb double triple\"\"\"\nrb\"\"\"br single triple\"\"\"\nrb\"\"\"br double triple\"\"\"\n\n\"single1single2\"\n\"single1double2\"\n\"double1single2\"\n\"double1double2\"\n\n\ndef docstring_single_triple():\n \"\"\"single triple\"\"\"\n\n\ndef docstring_double_triple():\n \"\"\"double triple\"\"\"\n\n\ndef docstring_double():\n \"double triple\"\n\n\ndef docstring_single():\n \"single\"\n" Received: "\"single\"\n\n\"double\"\nr\"r single\"\nr\"r double\"\nf\"f single\"\nf\"f double\"\nrf\"fr single\"\nrf\"fr double\"\nrf\"rf single\"\nrf\"rf double\"\nb\"b single\"\nb\"b double\"\nrb\"rb single\"\nrb\"rb double\"\nrb\"br single\"\nrb\"br double\"\n\n\"\"\"single triple\"\"\"\n\"\"\"double triple\"\"\"\nr\"\"\"r single triple\"\"\"\nr\"\"\"r double triple\"\"\"\nf\"\"\"f single triple\"\"\"\nf\"\"\"f double triple\"\"\"\nrf\"\"\"fr single triple\"\"\"\nrf\"\"\"fr double triple\"\"\"\nrf\"\"\"rf single triple\"\"\"\nrf\"\"\"rf double triple\"\"\"\nb\"\"\"b single triple\"\"\"\nb\"\"\"b double triple\"\"\"\nrb\"\"\"rb single triple\"\"\"\nrb\"\"\"rb double triple\"\"\"\nrb\"\"\"br single triple\"\"\"\nrb\"\"\"br double triple\"\"\"\n\n\"single1\" \"single2\"\n\"single1\" \"double2\"\n\"double1\" \"single2\"\n\"double1\" \"double2\"\n\n\ndef docstring_single_triple():\n \"\"\"single triple\"\"\"\n\n\ndef docstring_double_triple():\n \"\"\"double triple\"\"\"\n\n\ndef docstring_double():\n \"double triple\"\n\n\ndef docstring_single():\n \"single\"\n" at <anonymous> (/home/runner/work/ruff_fmt/ruff_fmt/crates/ruff_fmt/test_bun/bun.spec.ts:23:24)
error: expect(received).toBe(expected): crates/ruff_fmt/test_bun/bun.spec.ts#L23
Expected: "# leading match comment\nmatch foo: # dangling match comment\n case \"bar\":\n pass\n\n\n# leading match comment\nmatch ( # leading expr comment\n # another leading expr comment\n foo # trailing expr comment\n # another trailing expr comment\n): # dangling match comment\n case \"bar\":\n pass\n\n\n# leading match comment\nmatch ( # hello\n foo, # trailing expr comment # another\n): # dangling match comment\n case \"bar\":\n pass\n\n\nmatch [ # comment\n first,\n second,\n third,\n]: # another comment\n case [\"a\", \"b\", \"c\"]:\n pass\n\nmatch ( # comment\n \"a b c\"\n).split(): # another comment\n case [\"a\", \"b\", \"c\"]:\n pass\n\n\nmatch ( # comment\n # let's go\n yield foo\n): # another comment\n case [\"a\", \"b\", \"c\"]:\n pass\n\n\nmatch aaaaaaaaahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh: # comment\n case \"sshhhhhhhh\":\n pass\n\n\ndef foo():\n match inside_func: # comment\n case \"bar\":\n pass\n\n\nmatch newlines:\n # case 1 leading comment\n\n case \"top level case comment with newlines\": # case dangling comment\n # pass leading comment\n pass\n # pass trailing comment\n\n # case 2 leading comment\n\n case \"case comment with newlines\" if foo == 2: # second\n pass\n\n case \"one\", \"newline\" if foo := 1: # third\n pass\n\n case \"two newlines\":\n pass\n\n case \"three newlines\":\n pass\n case _:\n pass\n\n\nmatch long_lines:\n case \"this is a long line for if condition\" if (\n aaaaaaaaahhhhhhhh == 1 and bbbbbbaaaaaaaaaaa == 2\n ): # comment\n pass\n\n case \"this is a long line for if condition with parentheses\" if (\n aaaaaaaaahhhhhhhh == 1 and bbbbbbaaaaaaaaaaa == 2\n ): # comment\n pass\n\n case \"named expressions aren't special\" if foo := 1:\n pass\n\n case \"named expressions aren't that special\" if foo := 1:\n pass\n\n case \"but with already broken long lines\" if (\n aaaaaaahhhhhhhhhhh == 1 and bbbbbbbbaaaaaahhhh == 2\n ): # another comment\n pass\n\n case {\"long_long_long_key\": str(long_long_long_key)} if (\n value := \"long long long long long long long long long long long value\"\n ):\n pass\n\n\nmatch pattern_comments:\n case (\n only_trailing # trailing 1\n # trailing 2\n # trailing 3\n ):\n pass\n\n\nmatch pattern_comments:\n case ( # leading\n only_leading\n ):\n pass\n\n\nmatch pattern_comments:\n case (\n # leading\n leading_and_trailing # trailing 1\n # trailing 2\n # trailing 3\n ):\n pass\n\n\nmatch pattern_comments:\n case no_comments:\n pass\n\n\nmatch pattern_comments:\n case (\n # 1\n pattern # 2\n # 3\n as # 4\n # 5\n name # 6\n # 7\n ):\n pass\n\n\nmatch pattern_comments:\n case (\n pattern\n # 1\n as # 2\n # 3\n name # 4\n # 5\n ):\n pass\n\n\nmatch pattern_comments:\n case (\n pattern\n # 1\n as\n # 2\n name\n # 3\n ):\n pass\n\n\nmatch subject:\n case (\n pattern # 1\n as # 2\n name # 3\n ):\n pass\n\n\nmatch x:\n case (a as b) as c:\n pass\n\n\nmatch pattern_singleton:\n case (\n # leading 1\n # leading 2\n None # trailing\n # trailing own 1\n # trailing own 2\n ):\n pass\n case (\n True # trailing\n ):\n pass\n case False:\n pass\n\n\nmatch foo:\n case \"a\", \"b\":\n pass\n case (\n \"a\",\n \"b\",\n ):\n pass\n case (\"a\", \"b\"):\n pass\n case [\"a\", \"b\"]:\n pass\n case [\"a\", \"b\"]:\n pass\n\n\nmatch foo:\n case
error: expect(received).toBe(expected): crates/ruff_fmt/test_bun/bun.spec.ts#L23
Expected: "# Handle comments on empty tuple return types.\ndef zrevrangebylex(\n self,\n name: _Key,\n max: _Value,\n min: _Value,\n start: int | None = None,\n num: int | None = None,\n) -> ( # type: ignore[override]\n): ...\n\n\ndef zrevrangebylex(\n self,\n name: _Key,\n max: _Value,\n min: _Value,\n start: int | None = None,\n num: int | None = None,\n) -> ( # type: ignore[override]\n # comment\n): ...\n\n\ndef zrevrangebylex(\n self,\n name: _Key,\n max: _Value,\n min: _Value,\n start: int | None = None,\n num: int | None = None,\n) -> ( # type: ignore[override]\n 1\n): ...\n\n\ndef zrevrangebylex(\n self,\n name: _Key,\n max: _Value,\n min: _Value,\n start: int | None = None,\n num: int | None = None,\n) -> ( # type: ignore[override]\n 1,\n 2,\n): ...\n\n\ndef zrevrangebylex(\n self,\n name: _Key,\n max: _Value,\n min: _Value,\n start: int | None = None,\n num: int | None = None,\n) -> ( # type: ignore[override]\n (1, 2)\n): ...\n\n\ndef handleMatch( # type: ignore[override] # https://github.com/python/mypy/issues/10197\n self, m: Match[str], data: str\n) -> Union[Tuple[None, None, None], Tuple[Element, int, int]]: ...\n\n\ndef double(\n a: int, # Hello\n) -> int:\n return 2 * a\n\n\ndef double(\n a: int,\n) -> ( # Hello\n int\n):\n return 2 * a\n\n\ndef double(\n a: int,\n) -> ( # Hello\n):\n return 2 * a\n\n\n# Breaking over parameters and return types. (Black adds a trailing comma when the\n# function arguments break here with a single argument; we do not.)\ndef f(\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n) -> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: ...\n\n\ndef f(\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, a\n) -> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: ...\n\n\ndef f(\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n) -> a: ...\n\n\ndef f(\n a,\n) -> (\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n): ...\n\n\ndef f[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]() -> (\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n): ...\n\n\ndef f[\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n]() -> a: ...\n\n\ndef f[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa](\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n) -> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: ...\n\n\ndef f[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa](\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n) -> a: ...\n\n\n# Breaking return type annotations. Black adds parentheses if the parameters are\n# empty; otherwise, it leverages the expressions own parentheses if possible.\ndef xxxxxxxxxxxxxxxxxxxxxxxxxxxx() -> Set[\n \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n]: ...\n\n\ndef xxxxxxxxxxxxxxxxxxxxxxxxxxxx() -> Set[\n \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n]: ...\n\n\ndef xxxxxxxxxxxxxxxxxxxxxxxxxxxx() -> Set[\n \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n]: ...\n\n\ndef xxxxxxxxxxxxxxxxxxxxxxxxxxxx() -> Set[\n \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n]: ...\n\n\ndef xxxxxxxxxxxxxxxxxxxxxxxxxxxx(\n x,\n) -> Set[\n \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n]: ...\n\n\ndef xxxxxxxxxxxxxxxxxxxxxxxxxxxx(\n x,\n) -> Set[\n \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n]: ...\n\n\ndef xxxxxxxxxxxxxxxxxxxxxxxxxxxx(\n *args,\n) -> Set[\n \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n]: ...\n\n\ndef xxxxxxxxxxxxxxxxxxxxxxxxxxxx( # foo\n) -> Set[\n \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n]: ...\n\n\ndef xxxxxxxxxxxxxxxxxxxxxxxxxxxx(\n # bar\n) -> Set[\n \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n]: ...\n\n\nd
error: expect(received).toBe(expected): crates/ruff_fmt/test_bun/bun.spec.ts#L23
Expected: "assert True # Trailing same-line\nassert True is True # Trailing same-line\nassert 1, \"Some string\" # Trailing same-line\nassert aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa # Trailing same-line\n\nassert ( # Dangle1\n # Dangle2\n)\n\n# TODO: https://github.com/astral-sh/ruff/pull/5168#issuecomment-1630767421\n# Leading assert\nassert (\n # Leading test value\n True # Trailing test value same-line\n # Trailing test value own-line\n), \"Some string\" # Trailing msg same-line\n# Trailing assert\n\n# Random dangler\n\n# TODO: https://github.com/astral-sh/ruff/pull/5168#issuecomment-1630767421\n# Leading assert\nassert (\n # Leading test value\n True # Trailing test value same-line\n # Trailing test value own-line\n # Test dangler\n), \"Some string\" # Trailing msg same-line\n# Trailing assert\n\n\ndef test():\n assert {\n key1: value1,\n key2: value2,\n key3: value3,\n key4: value4,\n key5: value5,\n key6: value6,\n key7: value7,\n key8: value8,\n key9: value9,\n } == expected, (\n \"Not what we expected and the message is too long to fit ineeeeee one line\"\n )\n\n assert {\n key1: value1,\n key2: value2,\n key3: value3,\n key4: value4,\n key5: value5,\n key6: value6,\n key7: value7,\n key8: value8,\n key9: value9,\n } == expected, (\n \"Not what we expected and the message is too long to fit in one lineeeee\"\n )\n\n assert {\n key1: value1,\n key2: value2,\n key3: value3,\n key4: value4,\n key5: value5,\n key6: value6,\n key7: value7,\n key8: value8,\n key9: value9,\n } == expected, (\n \"Not what we expected and the message is too long to fit in one lineeeeeeeeeeeee\"\n )\n\n assert (\n {\n key1: value1,\n key2: value2,\n key3: value3,\n key4: value4,\n key5: value5,\n key6: value6,\n key7: value7,\n key8: value8,\n key9: value9,\n }\n == expectedeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\n ), \"Not what we expected and the message is too long to fit in one lin\"\n\n assert (\n {\n key1: value1,\n key2: value2,\n key3: value3,\n key4: value4,\n key5: value5,\n key6: value6,\n key7: value7,\n key8: value8,\n key9: value9,\n }\n == expectedeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\n ), (\n \"Not what we expected and the message is too long to fit in one lineeeeeeeeeeeeeeeee\"\n )\n\n assert expected == {\n key1: value1,\n key2: value2,\n key3: value3,\n key4: value4,\n key5: value5,\n key6: value6,\n key7: value7,\n key8: value8,\n key9: value9,\n }, \"Not what we expected and the message is too long to fit ineeeeee one line\"\n\n assert expected == {\n key1: value1,\n key2: value2,\n key3: value3,\n key4: value4,\n key5: value5,\n key6: value6,\n key7: value7,\n key8: value8,\n key9: value9,\n }, (\n \"Not what we expected and the message is too long to fit in one lineeeeeeeeeeeeeeeeeeee\"\n )\n\n assert (\n expectedeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\n == {\n key1: value1,\n key2: value2,\n key3: value3,\n key4: value4,\n key5: value5,\n key6: value6,\n key7: value7,\n key8: value8,\n key9: value9,\n }\n ), \"Not what we expected and the message is too long to fit in one lin\"\n\n assert (\n expectedeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
error: expect(received).toBe(expected): crates/ruff_fmt/test_bun/bun.spec.ts#L23
Expected: "l = [1, 2, 3, 4]\n\n\ndef foo():\n yield l\n\n b = yield l\n\n c = [(yield l), (yield l)]\n\n with (\n # Some comment\n yield\n ):\n pass\n\n if (yield):\n # comment\n pass\n\n # some comment\n for e in l:\n yield e # some comment\n\n for e in l:\n # some comment\n\n yield e\n\n # trail comment\n\n for e in l:\n # comment\n yield (e) # Too many parentheses\n # comment\n\n for ridiculouslylongelementnameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee in l:\n yield ridiculouslylongelementnameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\n\n for x in l: # comment\n yield x + (2 * 4) # trailing comment\n\n while (yield l):\n pass\n\n yield from (yield l)\n\n (\n yield (\n # comment 1\n (\n # comment 2\n # comment 3\n *test, # comment 4\n 1,\n )\n )\n )\n\n yield (\n \"# * Make sure each ForeignKey and OneToOneField has `on_delete` set \"\n \"to the desired behavior\"\n )\n\n yield (\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n + ccccccccccccccccccccccccccccccccccccccccccccccccccccccc\n )\n\n\nyield (\n \"Cache key will cause errors if used with memcached: %r \"\n \"(longer than %s)\"\n % (\n key,\n MEMCACHE_MAX_KEY_LENGTH,\n )\n)\n\nyield \"Cache key will cause errors if used with memcached: %r (longer than %s)\" % (\n key,\n MEMCACHE_MAX_KEY_LENGTH,\n)\n\n\nyield (\"Unnecessary\")\n\n\nyield (\n \"# * Make sure each ForeignKey and OneToOneField has `on_delete` set \"\n \"to the desired behavior\"\n)\nyield (\n \"# * Remove `managed = False` lines if you wish to allow \"\n \"Django to create, modify, and delete the table\"\n)\nyield (\n \"# Feel free to rename the models, but don't rename db_table values or field names.\"\n)\n\nyield (\n \"# * Make sure each ForeignKey and OneToOneField has `on_delete` set \"\n \"to the desired behavior\"\n)\nyield (\n \"# * Remove `managed = False` lines if you wish to allow \"\n \"Django to create, modify, and delete the table\"\n)\nyield (\n \"# Feel free to rename the models, but don't rename db_table values or field names.\"\n)\n\n# Regression test for: https://github.com/astral-sh/ruff/issues/7420\nresult = yield self.request(\n f\"/applications/{int(application_id)}/guilds/{int(scope)}/commands/{int(command_id)}/permissions\"\n)\n\nresult = yield (\n self.request(\n f\"/applications/{int(application_id)}/guilds/{int(scope)}/commands/{int(command_id)}/permissions\"\n )\n)\n\nresult = yield\n\nresult = yield (\n 1\n + f(\n 1,\n 2,\n 3,\n )\n)\n\nresult = yield (\n 1\n + f(\n 1,\n 2,\n 3,\n )\n)\n\nprint((yield x))\n" Received: "l = [1, 2, 3, 4]\n\n\ndef foo():\n yield l\n\n b = yield l\n\n c = [(yield l), (yield l)]\n\n with (\n # Some comment\n yield\n ):\n pass\n\n if (yield):\n # comment\n pass\n\n # some comment\n for e in l:\n yield e # some comment\n\n for e in l:\n # some comment\n\n yield e\n\n # trail comment\n\n for e in l:\n # comment\n yield (e) # Too many parentheses\n # comment\n\n for ridiculouslylongelementnameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee in l:\n yield ridiculouslylongelementnameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\n\n for x in l: # comment\n yield x + (2 * 4) # trailing comment\n\n while
error: expect(received).toBe(expected): crates/ruff_fmt/test_bun/bun.spec.ts#L23
Expected: "\"' test\"\n\n'\" test'\n\n'\" test'\n\"' test\"\n\n# Prefer single quotes for string with more double quotes\n\"' \\\" \\\" '' \\\" \\\" '\"\n\n# Prefer double quotes for string with more single quotes\n\"' \\\" \\\" '' \\\" \\\" '\"\n\n# Prefer double quotes for string with equal amount of single and double quotes\n\"\\\" ' \\\" \\\" ''\"\n\"' \\\" '' \\\" \\\"\"\n\n'\\\\\\' \"\"'\n'\\\\\\' \"\"'\n\n\n\"Test\"\n\"Test\"\n\nr\"Test\"\nR\"Test\"\n\n# Block conversion if there is an unescaped quote just before the end of the triple\n# quoted string\nr'''\\\"\"'''\nr'''\"\"'''\nr'\\\"\"'\n\n\"This string will not include \\\nbackslashes or newline characters.\"\n\nif True:\n \"This string will not include \\\n backslashes or newline characters.\"\n\n\"\"\"Multiline\nString \\\"\n\"\"\"\n\n\"\"\"Multiline\nString \\'\n\"\"\"\n\n\"\"\"Multiline\nString \"\"\n\"\"\"\n\n'''Multiline\nString \"\"\"\n'''\n\n'''Multiline\nString \"'''\n\n\"\"\"Multiline\nString '''\n\"\"\"\n\n\"\"\"Multiline\nString '\"\"\"\n\n\"\"\"Multiline\nString \\\"\\\"\\\"\n\"\"\"\n\n# String continuation\n\n\"Let'sstartwithasimpleexample\"\n\n\"Let'sstartwithasimpleexamplenow repeat after me:I am confidentI am confidentI am confidentI am confidentI am confident\"\n\n(\n \"Let's\"\n \"start\"\n \"with\"\n \"a\"\n \"simple\"\n \"example\"\n \"now repeat after me:\"\n \"I am confident\"\n \"I am confident\"\n \"I am confident\"\n \"I am confident\"\n \"I am confident\"\n)\n\nif (\n a + \"Let's\"\n \"start\"\n \"with\"\n \"a\"\n \"simple\"\n \"example\"\n \"now repeat after me:\"\n \"I am confident\"\n \"I am confident\"\n \"I am confident\"\n \"I am confident\"\n \"I am confident\"\n):\n pass\n\nif (\n \"Let's\"\n \"start\"\n \"with\"\n \"a\"\n \"simple\"\n \"example\"\n \"now repeat after me:\"\n \"I am confident\"\n \"I am confident\"\n \"I am confident\"\n \"I am confident\"\n \"I am confident\"\n):\n pass\n\n(\n # leading\n \"a\" # trailing part comment\n # leading part comment\n \"b\" # trailing second part comment\n # trailing\n)\n\ntest_particular = [\n # squares\n \"1.00000000100000000025\",\n \"1.0000000000000000000000000100000000000000000000000\" # ...\n \"00025\",\n \"1.0000000000000000000000000000000000000000000010000\" # ...\n \"0000000000000000000000000000000000000000025\",\n]\n\n# Parenthesized string continuation with messed up indentation\n{\"key\": ([], \"abc\")}\n\n\n# Regression test for https://github.com/astral-sh/ruff/issues/5893\nx = (\n \"\"\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\"\"\n \"\"\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\"\"\"\n)\nx = (\n f\"\"\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\"\"\n f\"\"\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\"\"\"\n)\nx = (\n b\"\"\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\"\"\n b\"\"\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\"\"\"\n)\n\n# https://github.com/astral-sh/ruff/issues/7460\ntrailing_preferred_quote_texts = [''' \"''', ''' \"\"''', ''' \"\"\"''', ''' \"\"\"\"''']\n\na = f\"\"\"\\x1f\"\"\"\na = \"\"\"\\x1f\"\"\"\na = \"\"\"\\\\x1F\"\"\"\na = \"\"\"\\\\\\x1f\"\"\"\n" Received: "\"' test\"\n\n'\" test'\n\n'\" test'\n\"' test\"\n\n# Prefer single quotes for string with more double quotes\n\"' \\\" \\\" '' \\\" \\\" '\"\n\n# Prefer double quotes for string with more single quotes\n\"' \\\" \\\" '' \\\" \\\" '\"\n\n# Prefer double quotes for string with equal amount of single and double quotes\n\"\\\" ' \\\" \\\" ''\"\n\"' \\\" '' \\\" \\\"\"\n\n'\\\\\\' \"\"'\n'\\\\\\' \"\"'\n\n\n\"Test\"\n\"Test\"\n\nr\"Test\"\nR\"Test\"\n\n# Block conversion if there is an unescaped quote just before the end of the triple\n# quoted string\nr'''\\\"\"'''\nr'''\"\"'''\nr'\\\"\"'\n\n\"This string will not include \\\nbackslashes or newline characters.\"\n\nif True:\n \"This string will not include \\\n backslashes or newline characters.\"\n\n\"\"\"Multiline\nString \\\"\n\"\"\"\n\n\"\"\"Multiline\nString \\'\n\"\"\"\n\n
error: expect(received).toBe(expected): crates/ruff_fmt/test_bun/bun.spec.ts#L23
Expected: "(f\"{one}{two}\")\n\n\nrf\"Not-so-tricky \\\"quote\"\n\n# Regression test for fstrings dropping comments\nresult_f = (\n \"Traceback (most recent call last):\\n\"\n f' File \"{__file__}\", line {lineno_f + 5}, in _check_recursive_traceback_display\\n'\n \" f()\\n\"\n f' File \"{__file__}\", line {lineno_f + 1}, in f\\n'\n \" f()\\n\"\n f' File \"{__file__}\", line {lineno_f + 1}, in f\\n'\n \" f()\\n\"\n f' File \"{__file__}\", line {lineno_f + 1}, in f\\n'\n \" f()\\n\"\n # XXX: The following line changes depending on whether the tests\n # are run through the interactive interpreter or with -m\n # It also varies depending on the platform (stack size)\n # Fortunately, we don't care about exactness here, so we use regex\n r\" \\[Previous line repeated (\\d+) more times\\]\"\n \"\\n\"\n \"RecursionError: maximum recursion depth exceeded\\n\"\n)\n\n\n# Regression for fstring dropping comments that were accidentally attached to\n# an expression inside a formatted value\n(\n f\"{1}\"\n # comment\n \"\"\n)\n\n(\n f\"{1}\" # comment\n f\"{2}\"\n)\n\n(\n f\"{1}{2}\" # comment\n)\n\n(\n 1,\n ( # comment\n f\"{2}\"\n ),\n)\n\n(\n (\n f\"{1}\"\n # comment\n ),\n 2,\n)\n\n# https://github.com/astral-sh/ruff/issues/6841\nx = f\"\"\"a{\"\"}b\"\"\"\ny = f'''c{1}d\"\"\"e'''\nz = f\"\"\"a{\"\"}b\"\"\" f'''c{1}d\"\"\"e'''\n" Received: "(f\"{one}\" f\"{two}\")\n\n\nrf\"Not-so-tricky \\\"quote\"\n\n# Regression test for fstrings dropping comments\nresult_f = (\n \"Traceback (most recent call last):\\n\"\n f' File \"{__file__}\", line {lineno_f+5}, in _check_recursive_traceback_display\\n'\n \" f()\\n\"\n f' File \"{__file__}\", line {lineno_f+1}, in f\\n'\n \" f()\\n\"\n f' File \"{__file__}\", line {lineno_f+1}, in f\\n'\n \" f()\\n\"\n f' File \"{__file__}\", line {lineno_f+1}, in f\\n'\n \" f()\\n\"\n # XXX: The following line changes depending on whether the tests\n # are run through the interactive interpreter or with -m\n # It also varies depending on the platform (stack size)\n # Fortunately, we don't care about exactness here, so we use regex\n r\" \\[Previous line repeated (\\d+) more times\\]\"\n \"\\n\"\n \"RecursionError: maximum recursion depth exceeded\\n\"\n)\n\n\n# Regression for fstring dropping comments that were accidentally attached to\n# an expression inside a formatted value\n(\n f\"{1}\"\n # comment\n \"\"\n)\n\n(\n f\"{1}\" # comment\n f\"{2}\"\n)\n\n(\n f\"{1}\" f\"{2}\" # comment\n)\n\n(\n 1,\n ( # comment\n f\"{2}\"\n ),\n)\n\n(\n (\n f\"{1}\"\n # comment\n ),\n 2,\n)\n\n# https://github.com/astral-sh/ruff/issues/6841\nx = f\"\"\"a{\"\"}b\"\"\"\ny = f'''c{1}d\"\"\"e'''\nz = f\"\"\"a{\"\"}b\"\"\" f'''c{1}d\"\"\"e'''\n" at <anonymous> (/home/runner/work/ruff_fmt/ruff_fmt/crates/ruff_fmt/test_bun/bun.spec.ts:23:24)
error: expect(received).toBe(expected): crates/ruff_fmt/test_bun/bun.spec.ts#L23
Expected: "raise ImproperlyConfigured(\n \"The app module %r has multiple filesystem locations (%r); \"\n \"you must configure this app with an AppConfig subclass \"\n \"with a 'path' class attr ibute.\" % (module, paths)\n)\n\nraise ImproperlyConfigured(\n \"The app module %r has multiple filesystem locations (%r); \"\n \"you must configure this app with an AppConfig subclass \"\n \"with a 'path' class attr ibute.\" %\n # comment\n (module, paths)\n)\n\n# Only important in parenthesized context because implicit string continuation otherwise doesn't expand\n\"The app module %r has multiple filesystem locations (%r); \" \"you must configure this app with an AppConfig subclass \" \"with a 'path' class attribute.\" % (\n module,\n paths,\n)\n\n(\n \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\"\n \"cccccccccccccccccccccccccccccccccccccccccccc\"\n % (\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n b,\n c,\n d,\n )\n)\n(\n \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\"\n \"cccccccccccccccccccccccccccccccccccccccccccc\"\n % aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n)\n\n\ndef test():\n return (\n \"\\n%(modified_count)s %(identifier)s %(action)s\"\n \"%(destination)s%(unmodified)s%(post_processed)s.\"\n ) % {\n \"modified_count\": modified_count,\n \"identifier\": \"static file\" + (\"\" if modified_count == 1 else \"s\"),\n \"action\": \"symlinked\" if self.symlink else \"copied\",\n \"destination\": (\" to '%s'\" % destination_path if destination_path else \"\"),\n \"unmodified\": (\n \", %s unmodified\" % unmodified_count if collected[\"unmodified\"] else \"\"\n ),\n \"post_processed\": (\n collected[\"post_processed\"]\n and \", %s post-processed\" % post_processed_count\n or \"\"\n ),\n }\n\n\n# trailing expression comment\nself._assert_skipping(\n SkipTestCase(\"test_foo\").test_foo,\n ValueError,\n \"skipUnlessDBFeature cannot be used on test_foo (test_utils.tests.\"\n \"SkippingTestCase.test_skip_unless_db_feature.<locals>.SkipTestCase%s) \"\n \"as SkippingTestCase.test_skip_unless_db_feature.<locals>.SkipTestCase \"\n \"doesn't allow queries against the 'default' database.\"\n # Python 3.11 uses fully qualified test name in the output.\n % (\".test_foo\" if PY311 else \"\"),\n)\n\n# dangling operator comment\nself._assert_skipping(\n SkipTestCase(\"test_foo\").test_foo,\n ValueError,\n \"skipUnlessDBFeature cannot be used on test_foo (test_utils.tests.\"\n \"SkippingTestCase.test_skip_unless_db_feature.<locals>.SkipTestCase%s) \"\n \"as SkippingTestCase.test_skip_unless_db_feature.<locals>.SkipTestCase \"\n \"doesn't allow queries against the 'default' database.\"\n % # Python 3.11 uses fully qualified test name in the output.\n (\".test_foo\" if PY311 else \"\"),\n)\n\n# Black keeps as many operands as fit on the same line as the `%`. Ruff does not. This is intentional as these are rare and complicated things significantly\n(\n \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbb\"\n \"cccccccccccccccccccccccccc\" % aaaaaaaaaaaa + x\n)\n\n(\n b + c + d + \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbb\"\n \"cccccccccccccccccccccccccc\" % aaaaaaaaaaaa + x\n)\n\n(\n b + c + d + \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n f\"bbbbbb{z}bbbbbbbbbbbbbbbbbbbbbbb\"\n \"cccccccccccccccccccccccccc\" % aaaaaaaaaaaa + x\n)\n\n(\n b < c > d < \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbb\"\n \"cccccccccccccccccccccccccc\" % aaaaaaaaaaaa > x\n)\n\n\nself.assertEqual(\n response.status_code,\n status_code,\n
error: expect(received).toBe(expected): crates/ruff_fmt/test_bun/bun.spec.ts#L23
Expected: "# Preview style: hug brackets to call parentheses.\nfunc(\n [\n 1,\n 2,\n 3,\n ]\n)\n\nfunc( # comment\n [\n 1,\n 2,\n 3,\n ]\n)\n\nfunc(\n # comment\n [\n 1,\n 2,\n 3,\n ]\n)\n\nfunc(\n [\n 1,\n 2,\n 3,\n ] # comment\n)\n\nfunc(\n [\n 1,\n 2,\n 3,\n ]\n # comment\n)\n\nfunc(\n [ # comment\n 1,\n 2,\n 3,\n ]\n)\n\nfunc(\n (\n [\n 1,\n 2,\n 3,\n ]\n )\n)\n\n\nfunc(\n (\n 1,\n 2,\n 3,\n )\n)\n\n# Ensure that comprehensions hug too.\nfunc(\n [\n (\n x,\n y,\n )\n for (x, y) in z\n ]\n)\n\n# Ensure that dictionaries hug too.\nfunc(\n {\n 1: 2,\n 3: 4,\n 5: 6,\n }\n)\n\n# Ensure that the same behavior is applied to parenthesized expressions.\n(\n [\n 1,\n 2,\n 3,\n ]\n)\n\n( # comment\n [\n 1,\n 2,\n 3,\n ]\n)\n\n(\n [ # comment\n 1,\n 2,\n 3,\n ]\n)\n\n# Ensure that starred arguments are also hugged.\nfoo(\n *[\n a_long_function_name(a_long_variable_name)\n for a_long_variable_name in some_generator\n ]\n)\n\nfoo(\n # comment\n *[\n a_long_function_name(a_long_variable_name)\n for a_long_variable_name in some_generator\n ]\n)\n\nfoo(\n **[\n a_long_function_name(a_long_variable_name)\n for a_long_variable_name in some_generator\n ]\n)\n\nfoo(\n # comment\n **[\n a_long_function_name(a_long_variable_name)\n for a_long_variable_name in some_generator\n ]\n)\n\n# Ensure that multi-argument calls are _not_ hugged.\nfunc(\n [\n 1,\n 2,\n 3,\n ],\n bar,\n)\n\nfunc(\n [\n (\n x,\n y,\n )\n for (x, y) in z\n ],\n bar,\n)\n\n\n# Ensure that return type annotations (which use `parenthesize_if_expands`) are also hugged.\ndef func() -> [\n 1,\n 2,\n 3,\n]:\n pass\n\n\ndef func() -> [\n 1,\n 2,\n 3,\n]:\n pass\n\n\ndef func() -> [\n 1,\n 2,\n 3,\n]:\n pass\n\n\ndef func() -> ( # comment\n [\n 1,\n 2,\n 3,\n ]\n):\n pass\n\n\ndef func() -> (\n [\n 1,\n 2,\n 3,\n ] # comment\n):\n pass\n\n\ndef func() -> (\n [\n 1,\n 2,\n 3,\n ]\n # comment\n):\n pass\n\n\n# Ensure that nested lists are hugged.\nfunc(\n [\n [\n 1,\n 2,\n 3,\n ]\n ]\n)\n\n\nfunc(\n [\n # comment\n [\n 1,\n 2,\n 3,\n ]\n ]\n)\n\nfunc(\n [\n [\n 1,\n 2,\n 3,\n ]\n # comment\n ]\n)\n\nfunc(\n [\n [ # comment\n 1,\n 2,\n 3,\n ]\n ]\n)\n\n\nfunc(\n [ # comment\n [\n 1,\n 2,\n 3,\n ]\n ]\n)\n" Received: "# Preview style: hug brackets to call parentheses.\nfunc(\n [\n 1,\n 2,\n 3,\n ]\n)\n\nfunc( # comment\n [\n 1,\n 2,\n 3,\n ]\n)\n\nfunc(\n # comment\n [\n 1,\n 2,\n 3,\n ]\n)\n\nfunc(\n [\n 1,\n 2,\n 3,\n ] # comment\n)\n\nfunc(\n [\n 1,\n 2,\n 3,\n ]\n # comment\n)\n\nfunc(\n [ # comment\n 1,\n 2,\n 3,\n ]\n)\n\nfunc(\n (\n [\n 1,\n 2,\n 3,\n ]\n )\n)\n\n\nfunc(\n (\n 1,\n 2,\n 3,\n )\n)\n\n# Ensure that comprehensions hug too.\nfunc(\n [\n (\n x,\n y,\n )\n for (x, y) in z\n ]\n)\n\n# Ensure that dictionaries hug too.\nfunc(\n {\n 1: 2,\n 3: 4,\n 5: 6,\n }\n)\n\n# Ensure tha
node-test
Process completed with exit code 1.
deno-test
Process completed with exit code 1.
Cargo fmt
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Cargo clippy
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Cargo test
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Wasm build
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
bun-test
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
node-test
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
deno-test
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636

Artifacts

Produced during runtime
Name Size
build
1.29 MB