From 4675b6779fcbbdaef36c805d6659a5b773433d0b Mon Sep 17 00:00:00 2001 From: John Vouvakis Manousakis Date: Sat, 17 Aug 2024 04:20:32 -0700 Subject: [PATCH] Add # noqa manually ruff check --add-noqa doesn't modify `.ipynb` files. --- .../AutoSDA/Preprocessing/CleanBeamSectionDatabase.ipynb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/createSAM/AutoSDA/Preprocessing/CleanBeamSectionDatabase.ipynb b/modules/createSAM/AutoSDA/Preprocessing/CleanBeamSectionDatabase.ipynb index 892ec8a1e..abbe355f2 100644 --- a/modules/createSAM/AutoSDA/Preprocessing/CleanBeamSectionDatabase.ipynb +++ b/modules/createSAM/AutoSDA/Preprocessing/CleanBeamSectionDatabase.ipynb @@ -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)" ]