{"time": "2023-03-19T07:13:13.234390", "lm": "spellbook", "url": "https://dashboard.scale.com/spellbook/api/v2/deploy/", "input": "Here is a patch with incorrect linecounts:\norder\n\ndiff --git a/lm/__main__.py b/lm/__main__.py\n--- a/lm/__main__.py\n+++ b/lm/__main__.py\n@@ -12,14 +12,18 @@ async def amain():\n parser.add_argument('-o', '--output', type=argparse.FileType('w'), default=sys.stdout, help='Output file')\n parser.add_argument('input_data', nargs='*', help='Input data or filename')\n args = parser.parse_args()\n+ \n+ input_data = []\n \n- if len(args.input_data) == 1 and os.path.exists(args.input_data[0]):\n- with open(args.input_data[1], 'r') as f:\n- input_data = f.read()\n- log_input(input_data, args.output)\n- elif args.input_data:\n- input_data = ' '.join(args.input_data)\n+ for arg in args.input_data:\n+ if os.path.exists(arg):\n+ with open(arg, 'r') as f:\n+ input_data.append(f.read())\n+ else:\n+ input_data.append(arg)\n+\n+ input_data = ' '.join(input_data)\n else:\n input_data = sys.stdin.read()\n \n\nHere is the same patch with correct linecounts:", "output": "order\n\ndiff --git a/lm/__main__.py b/lm/__main__.py\n--- a/lm/__main__.py\n+++ b/lm/__main__.py\n@@ -12,7 +12,11 @@ async def amain():\n parser.add_argument('-o', '--output', type=argparse.FileType('w'), default=sys.stdout, help='Output file')\n parser.add_argument('input_data', nargs='*', help='Input data or filename')\n args = parser.parse_args()\n+ \n+ input_data = []\n\n- if len(args.input_data) == 1 and os.path.exists(args.input_data[0]):\n- with open(args.input_data[1], 'r') as f:\n- input_data = f.read()\n- log_input(input_data, args.output)\n- elif args.input_data:\n- input_data = ' '.join(args.input_data)\n+ for arg in args.input_data:\n+ if os.path.exists(arg):\n+ with open(arg, 'r') as f:\n+ input_data.append(f.read())\n+ else:\n+ input_data.append(arg)\n+\n+ input_data = ' '.join(input_data)\n else:\n input_data = sys.stdin.read()"}