Skip to content

Commit a32fdf5

Browse files
committed
Modify Brax example to pass the ruff check.
1 parent 5d26027 commit a32fdf5

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

docs/source/example/Brax.ipynb

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@
1616
"metadata": {},
1717
"outputs": [],
1818
"source": [
19-
"# install evox, skip it if you have already installed evox\n",
20-
"try:\n",
21-
" import evox\n",
22-
"except ImportError:\n",
23-
" !pip install --disable-pip-version-check --upgrade -q evox brax"
19+
"# install EvoX and Brax, skip it if you have already installed EvoX\n",
20+
"from importlib.util import find_spec\n",
21+
"\n",
22+
"if find_spec(\"evox\") is None:\n",
23+
" %pip install evox\n",
24+
"\n",
25+
"if find_spec(\"evox\") is None:\n",
26+
" %pip install evox"
2427
]
2528
},
2629
{

0 commit comments

Comments
 (0)