Skip to content

Commit

Permalink
Add # noqa manually
Browse files Browse the repository at this point in the history
ruff check --add-noqa doesn't modify `.ipynb` files.
  • Loading branch information
ioannis-vm committed Aug 17, 2024
1 parent 4258790 commit 4675b67
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,18 @@
"source": [
"import pandas as pd\n",
"\n",
"with open('BeamDatabase1.csv') as file:\n",
"with open('BeamDatabase1.csv') as file: # noqa: PTH123\n",
" beam_section_database = pd.read_csv(file, header=0)\n",
"\n",
"# Beam section weight shall be less than 300 lb/ft\n",
"# Beam flange thickness shall be less than 1.75 inch.\n",
"target_index = []\n",
"for indx in beam_section_database['index']:\n",
" if beam_section_database.loc[indx, 'weight'] >= 300 or beam_section_database.loc[indx, 'tf'] >= 1.75:\n",
" target_index.append(indx)\n",
" if (\n",
" beam_section_database.loc[indx, 'weight'] >= 300 # noqa: PLR2004\n",
" or beam_section_database.loc[indx, 'tf'] >= 1.75 # noqa: PLR2004\n",
" ):\n",
" target_index.append(indx) # noqa: PERF401\n",
"clean_beam_section = beam_section_database.drop(index=target_index)\n",
"clean_beam_section.to_csv('BeamDatabase2.csv', sep=',', index=False)"
]
Expand Down

0 comments on commit 4675b67

Please sign in to comment.