|
127 | 127 | }, |
128 | 128 | { |
129 | 129 | "cell_type": "code", |
130 | | - "execution_count": null, |
| 130 | + "execution_count": 1, |
131 | 131 | "id": "2d84af63", |
132 | 132 | "metadata": {}, |
133 | | - "outputs": [], |
| 133 | + "outputs": [ |
| 134 | + { |
| 135 | + "name": "stderr", |
| 136 | + "output_type": "stream", |
| 137 | + "text": [ |
| 138 | + "No ruleset has been found. Please provide a ruleset using the --ruleset CLI argument, or make sure your ruleset file matches .?spectral.(js|ya?ml|json)" |
| 139 | + ] |
| 140 | + }, |
| 141 | + { |
| 142 | + "ename": "CalledProcessError", |
| 143 | + "evalue": "Command 'b'# Run via docker.\\ndocker run --rm -v $(pwd):/app -w /app docker.io/stoplight/spectral lint openapi.yaml\\n'' returned non-zero exit status 2.", |
| 144 | + "output_type": "error", |
| 145 | + "traceback": [ |
| 146 | + "\u001b[31m---------------------------------------------------------------------------\u001b[39m", |
| 147 | + "\u001b[31mCalledProcessError\u001b[39m Traceback (most recent call last)", |
| 148 | + "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[1]\u001b[39m\u001b[32m, line 1\u001b[39m\n\u001b[32m----> \u001b[39m\u001b[32m1\u001b[39m \u001b[43mget_ipython\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m.\u001b[49m\u001b[43mrun_cell_magic\u001b[49m\u001b[43m(\u001b[49m\u001b[33;43m'\u001b[39;49m\u001b[33;43mbash\u001b[39;49m\u001b[33;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[33;43m'\u001b[39;49m\u001b[33;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[33;43m'\u001b[39;49m\u001b[33;43m# Run via docker.\u001b[39;49m\u001b[38;5;130;43;01m\\n\u001b[39;49;00m\u001b[33;43mdocker run --rm -v $(pwd):/app -w /app docker.io/stoplight/spectral lint openapi.yaml\u001b[39;49m\u001b[38;5;130;43;01m\\n\u001b[39;49;00m\u001b[33;43m'\u001b[39;49m\u001b[43m)\u001b[49m\n", |
| 149 | + "\u001b[36mFile \u001b[39m\u001b[32m~/.python/lib/python3.12/site-packages/IPython/core/interactiveshell.py:2549\u001b[39m, in \u001b[36mInteractiveShell.run_cell_magic\u001b[39m\u001b[34m(self, magic_name, line, cell)\u001b[39m\n\u001b[32m 2547\u001b[39m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[38;5;28mself\u001b[39m.builtin_trap:\n\u001b[32m 2548\u001b[39m args = (magic_arg_s, cell)\n\u001b[32m-> \u001b[39m\u001b[32m2549\u001b[39m result = \u001b[43mfn\u001b[49m\u001b[43m(\u001b[49m\u001b[43m*\u001b[49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43m*\u001b[49m\u001b[43m*\u001b[49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 2551\u001b[39m \u001b[38;5;66;03m# The code below prevents the output from being displayed\u001b[39;00m\n\u001b[32m 2552\u001b[39m \u001b[38;5;66;03m# when using magics with decorator @output_can_be_silenced\u001b[39;00m\n\u001b[32m 2553\u001b[39m \u001b[38;5;66;03m# when the last Python token in the expression is a ';'.\u001b[39;00m\n\u001b[32m 2554\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mgetattr\u001b[39m(fn, magic.MAGIC_OUTPUT_CAN_BE_SILENCED, \u001b[38;5;28;01mFalse\u001b[39;00m):\n", |
| 150 | + "\u001b[36mFile \u001b[39m\u001b[32m~/.python/lib/python3.12/site-packages/IPython/core/magics/script.py:159\u001b[39m, in \u001b[36mScriptMagics._make_script_magic.<locals>.named_script_magic\u001b[39m\u001b[34m(line, cell)\u001b[39m\n\u001b[32m 157\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[32m 158\u001b[39m line = script\n\u001b[32m--> \u001b[39m\u001b[32m159\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mshebang\u001b[49m\u001b[43m(\u001b[49m\u001b[43mline\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcell\u001b[49m\u001b[43m)\u001b[49m\n", |
| 151 | + "\u001b[36mFile \u001b[39m\u001b[32m~/.python/lib/python3.12/site-packages/IPython/core/magics/script.py:336\u001b[39m, in \u001b[36mScriptMagics.shebang\u001b[39m\u001b[34m(self, line, cell)\u001b[39m\n\u001b[32m 331\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m args.raise_error \u001b[38;5;129;01mand\u001b[39;00m p.returncode != \u001b[32m0\u001b[39m:\n\u001b[32m 332\u001b[39m \u001b[38;5;66;03m# If we get here and p.returncode is still None, we must have\u001b[39;00m\n\u001b[32m 333\u001b[39m \u001b[38;5;66;03m# killed it but not yet seen its return code. We don't wait for it,\u001b[39;00m\n\u001b[32m 334\u001b[39m \u001b[38;5;66;03m# in case it's stuck in uninterruptible sleep. -9 = SIGKILL\u001b[39;00m\n\u001b[32m 335\u001b[39m rc = p.returncode \u001b[38;5;129;01mor\u001b[39;00m -\u001b[32m9\u001b[39m\n\u001b[32m--> \u001b[39m\u001b[32m336\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m CalledProcessError(rc, cell)\n", |
| 152 | + "\u001b[31mCalledProcessError\u001b[39m: Command 'b'# Run via docker.\\ndocker run --rm -v $(pwd):/app -w /app docker.io/stoplight/spectral lint openapi.yaml\\n'' returned non-zero exit status 2." |
| 153 | + ] |
| 154 | + } |
| 155 | + ], |
134 | 156 | "source": [ |
135 | 157 | "%%bash\n", |
136 | 158 | "# Run via docker.\n", |
|
224 | 246 | ] |
225 | 247 | } |
226 | 248 | ], |
227 | | - "metadata": {}, |
| 249 | + "metadata": { |
| 250 | + "kernelspec": { |
| 251 | + "display_name": ".python", |
| 252 | + "language": "python", |
| 253 | + "name": "python3" |
| 254 | + }, |
| 255 | + "language_info": { |
| 256 | + "codemirror_mode": { |
| 257 | + "name": "ipython", |
| 258 | + "version": 3 |
| 259 | + }, |
| 260 | + "file_extension": ".py", |
| 261 | + "mimetype": "text/x-python", |
| 262 | + "name": "python", |
| 263 | + "nbconvert_exporter": "python", |
| 264 | + "pygments_lexer": "ipython3", |
| 265 | + "version": "3.12.3" |
| 266 | + } |
| 267 | + }, |
228 | 268 | "nbformat": 4, |
229 | 269 | "nbformat_minor": 5 |
230 | 270 | } |
0 commit comments