{
  "appeals": 1,
  "budgets": {
    "baseline_limit_s": 600,
    "verification_timeout_s": 600,
    "worker": {
      "max_completion_tokens": 96000,
      "max_turns": 60,
      "max_wall_seconds": 1500.0,
      "prompt_token_budget": 160000
    }
  },
  "issue": "Formatting hanging indents raises ValueError\nExample file:\r\n\r\n```python\r\ndef foo():\r\n    print('asdf',\r\n    file=None\r\n    )\r\n```\r\n\r\nFormatting this raises:\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/pyls_jsonrpc/endpoint.py\", line 113, in consume\r\n    self._handle_request(message['id'], message['method'], message.get('params'))\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/pyls_jsonrpc/endpoint.py\", line 182, in _handle_request\r\n    handler_result = handler(params)\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/pyls_jsonrpc/dispatchers.py\", line 23, in handler\r\n    return method(**(params or {}))\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/pyls/python_ls.py\", line 347, in m_text_document__range_formatting\r\n    return self.format_range(textDocument['uri'], range)\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/pyls/python_ls.py\", line 258, in format_range\r\n    return self._hook('pyls_format_range', doc_uri, range=range)\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/pyls/python_ls.py\", line 155, in _hook\r\n    return hook_handlers(config=self.config, workspace=workspace, document=doc, **kwargs)\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/pluggy/hooks.py\", line 286, in __call__\r\n    return self._hookexec(self, self.get_hookimpls(), kwargs)\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/pluggy/manager.py\", line 93, in _hookexec\r\n    return self._inner_hookexec(hook, methods, kwargs)\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/pluggy/manager.py\", line 337, in traced_hookexec\r\n    return outcome.get_result()\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/pluggy/callers.py\", line 80, in get_result\r\n    raise ex[1].with_traceback(ex[2])\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/pluggy/callers.py\", line 52, in from_call\r\n    result = func()\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/pluggy/manager.py\", line 335, in <lambda>\r\n    outcome = _Result.from_call(lambda: oldcall(hook, hook_impls, kwargs))\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/pluggy/manager.py\", line 87, in <lambda>\r\n    firstresult=hook.spec.opts.get(\"firstresult\") if hook.spec else False,\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/pluggy/callers.py\", line 208, in _multicall\r\n    return outcome.get_result()\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/pluggy/callers.py\", line 80, in get_result\r\n    raise ex[1].with_traceback(ex[2])\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/pluggy/callers.py\", line 187, in _multicall\r\n    res = hook_impl.function(*args)\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/pyls/plugins/autopep8_format.py\", line 26, in pyls_format_range\r\n    return _format(config, document, line_range=line_range)\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/pyls/plugins/autopep8_format.py\", line 34, in _format\r\n    new_source = fix_code(document.source, options=options)\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/autopep8.py\", line 3414, in fix_code\r\n    return fix_lines(sio.readlines(), options=options)\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/autopep8.py\", line 3489, in fix_lines\r\n    fixed_source = fix.fix()\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/autopep8.py\", line 600, in fix\r\n    aggressive=self.options.aggressive))\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/autopep8.py\", line 542, in _fix_source\r\n    modified_lines = fix(result)\r\n  File \"/home/kb/apps/pls-venv/lib/python3.7/site-packages/autopep8.py\", line 616, in _fix_reindent\r\n    num_indent_spaces = int(result['info'].split()[1])\r\nValueError: invalid literal for int() with base 10: 'continuation'\r\n```\r\n\r\nCaused by palantir/python-language-server#719 replacing the autopep8 checker for `pycodestyle.continued_indentation`",
  "source": {
    "image": "docker.io/swerebenchv2/palantir-python-language-server:829-5fa7ae9",
    "platform": "linux/amd64",
    "python": "python",
    "setup": [
      "python -c 'import base64; from pathlib import Path; Path('\"'\"'/tmp/receipts-palantir__python-language-server-829-test.patch'\"'\"').write_bytes(base64.b64decode('\"'\"'ZGlmZiAtLWdpdCBhL3Rlc3QvcGx1Z2lucy90ZXN0X2F1dG9wZXA4X2Zvcm1hdC5weSBiL3Rlc3QvcGx1Z2lucy90ZXN0X2F1dG9wZXA4X2Zvcm1hdC5weQppbmRleCA4MTM4OTUyLi5kMjNhMWM0IDEwMDY0NAotLS0gYS90ZXN0L3BsdWdpbnMvdGVzdF9hdXRvcGVwOF9mb3JtYXQucHkKKysrIGIvdGVzdC9wbHVnaW5zL3Rlc3RfYXV0b3BlcDhfZm9ybWF0LnB5CkBAIC0xNSw2ICsxNSwyNSBAQCBkZWYgZnVuYygpOgogCiBHT09EX0RPQyA9ICIiIkEgPSBbJ2hlbGxvJywgJ3dvcmxkJ11cbiIiIgogCitJTkRFTlRFRF9ET0MgPSAiIiJkZWYgZm9vKCk6CisgICAgcHJpbnQoJ2FzZGYnLAorICAgIGZpbGU9Tm9uZQorICAgICkKKworYmFyID0geyAnZm9vJzogZm9vCit9CisiIiIKKworQ09SUkVDVF9JTkRFTlRFRF9ET0MgPSAiIiJkZWYgZm9vKCk6CisgICAgcHJpbnQoJ2FzZGYnLAorICAgICAgICAgIGZpbGU9Tm9uZQorICAgICAgICAgICkKKworCitiYXIgPSB7J2Zvbyc6IGZvbworICAgICAgIH0KKyIiIgorCiAKIGRlZiB0ZXN0X2Zvcm1hdChjb25maWcsIHdvcmtzcGFjZSk6CiAgICAgZG9jID0gRG9jdW1lbnQoRE9DX1VSSSwgd29ya3NwYWNlLCBET0MpCkBAIC00MiwzICs2MSwxMSBAQCBkZWYgdGVzdF9yYW5nZV9mb3JtYXQoY29uZmlnLCB3b3Jrc3BhY2UpOgogZGVmIHRlc3Rfbm9fY2hhbmdlKGNvbmZpZywgd29ya3NwYWNlKToKICAgICBkb2MgPSBEb2N1bWVudChET0NfVVJJLCB3b3Jrc3BhY2UsIEdPT0RfRE9DKQogICAgIGFzc2VydCBub3QgcHlsc19mb3JtYXRfZG9jdW1lbnQoY29uZmlnLCBkb2MpCisKKworZGVmIHRlc3RfaGFuZ2luZ19pbmRlbnRhdGlvbihjb25maWcsIHdvcmtzcGFjZSk6CisgICAgZG9jID0gRG9jdW1lbnQoRE9DX1VSSSwgd29ya3NwYWNlLCBJTkRFTlRFRF9ET0MpCisgICAgcmVzID0gcHlsc19mb3JtYXRfZG9jdW1lbnQoY29uZmlnLCBkb2MpCisKKyAgICBhc3NlcnQgbGVuKHJlcykgPT0gMQorICAgIGFzc2VydCByZXNbMF1bJ25ld1RleHQnXSA9PSBDT1JSRUNUX0lOREVOVEVEX0RPQwo='\"'\"'))'",
      "git apply /tmp/receipts-palantir__python-language-server-829-test.patch"
    ],
    "workdir": "/python-language-server"
  },
  "spec_paths": [
    "test/plugins/test_autopep8_format.py"
  ],
  "spec_tests": [
    "test/plugins/test_autopep8_format.py::test_hanging_indentation"
  ],
  "suite_scope": "--no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning test/plugins/test_autopep8_format.py"
}
