Skip to content

Commit 02911a9

Browse files
authored
stdin:107:17: C416 Unnecessary dict comprehension - rewrite using dict() (#1257)
1 parent abaad9a commit 02911a9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/test-modified.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
pip uninstall -y monai-weekly # make sure there's no existing installation
3434
BUILD_MONAI=0 python -m pip install git+https://github.com/Project-MONAI/MONAI#egg=MONAI
3535
python -m pip install -r https://raw.githubusercontent.com/Project-MONAI/MONAI/main/requirements-dev.txt
36+
python -m pip install -U torch torchvision torchaudio
3637
- uses: actions/checkout@v3
3738
- name: Notebook quick check
3839
shell: bash

microscopy/multichannel_microscopy_classification.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@
468468
"dftest = df_all.loc[df_all.dataset == \"test\", :].reset_index()\n",
469469
"\n",
470470
"class_map = {c: idx for idx, c in enumerate(dftrain.cell_type.unique())}\n",
471-
"class_map_inv = {idx: c for idx, c in enumerate(dftrain.cell_type.unique())}\n",
471+
"class_map_inv = dict(enumerate(dftrain.cell_type.unique()))\n",
472472
"num_classes = len(class_map)\n",
473473
"class_names = list(class_map.keys())\n",
474474
"\n",
@@ -924,7 +924,7 @@
924924
],
925925
"metadata": {
926926
"kernelspec": {
927-
"display_name": "Python 3",
927+
"display_name": "Python 3 (ipykernel)",
928928
"language": "python",
929929
"name": "python3"
930930
},
@@ -938,7 +938,7 @@
938938
"name": "python",
939939
"nbconvert_exporter": "python",
940940
"pygments_lexer": "ipython3",
941-
"version": "3.8.10 (default, Nov 14 2022, 12:59:47) \n[GCC 9.4.0]"
941+
"version": "3.8.13"
942942
},
943943
"vscode": {
944944
"interpreter": {

0 commit comments

Comments
 (0)