Skip to content

Commit

Permalink
style(notebooks): Ignore Flake8 complaints on Notebooks
Browse files Browse the repository at this point in the history
One (E712) is a false positive as its used to subset a Pandas DataFrame.

The other two I've no current alternative plan as they involve creating buttons for users to upload files. Not sure
whether these will persist past the notebook refactor (#943) so have disabled the checks for the time being.
  • Loading branch information
ns-rse committed Dec 16, 2024
1 parent a030654 commit 6b59e95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions notebooks/OUTDATED-02-Summary-statistics-and-plots.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"outputs": [],
"source": [
"df = pd.read_csv(\"../tests/resources/minicircle_default_all_statistics.csv\")\n",
"df.set_index([\"image\", \"threshold\", \"molecule_number\"], inplace=True)"
"df.set_index([\"image\", \"threshold\", \"grain_number\"], inplace=True)"
]
},
{
Expand Down Expand Up @@ -195,7 +195,7 @@
"metadata": {},
"outputs": [],
"source": [
"df[df[\"circular\"] == False][\"end_to_end_distance\"].plot.hist(\n",
"df[df[\"circular\"] == False][\"end_to_end_distance\"].plot.hist( # noqa: E712\n",
" figsize=(16, 9), bins=20, title=\"End to End Distance\", alpha=0.5\n",
")"
]
Expand Down
4 changes: 2 additions & 2 deletions notebooks/OUTDATED-03-Plotting-scans.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@
" print(f\"filename : {filename}\")\n",
" print(f\"uploaded_file[filename]['metadata'] : {uploaded_file[filename]['metadata']}\")\n",
" # print(f\"uploaded_file : {str(uploaded_file.keys()[0])}\")\n",
" content = uploaded_file[filename][\"content\"]\n",
" content = uploaded_file[filename][\"content\"] # noqa: F841\n",
"\n",
"\n",
"upload_button = widgets.FileUpload(accept=\".npy\", multiple=False)\n",
"display(upload_button)\n",
"display(upload_button) # noqa: F821\n",
"# select_file_upload.observe(on_file_upload, names=\"value\")"
]
},
Expand Down

0 comments on commit 6b59e95

Please sign in to comment.