Skip to content

stdin:107:17: C416 Unnecessary dict comprehension - rewrite using dict() #1257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test-modified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
pip uninstall -y monai-weekly # make sure there's no existing installation
BUILD_MONAI=0 python -m pip install git+https://github.com/Project-MONAI/MONAI#egg=MONAI
python -m pip install -r https://raw.githubusercontent.com/Project-MONAI/MONAI/main/requirements-dev.txt
python -m pip install -U torch torchvision torchaudio
- uses: actions/checkout@v3
- name: Notebook quick check
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions microscopy/multichannel_microscopy_classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@
"dftest = df_all.loc[df_all.dataset == \"test\", :].reset_index()\n",
"\n",
"class_map = {c: idx for idx, c in enumerate(dftrain.cell_type.unique())}\n",
"class_map_inv = {idx: c for idx, c in enumerate(dftrain.cell_type.unique())}\n",
"class_map_inv = dict(enumerate(dftrain.cell_type.unique()))\n",
"num_classes = len(class_map)\n",
"class_names = list(class_map.keys())\n",
"\n",
Expand Down Expand Up @@ -924,7 +924,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -938,7 +938,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10 (default, Nov 14 2022, 12:59:47) \n[GCC 9.4.0]"
"version": "3.8.13"
},
"vscode": {
"interpreter": {
Expand Down