Skip to content

Commit 660337f

Browse files
committed
Spelling/formatting fixes
- Remove notebooks from allowlist that no longer exist
1 parent 233b325 commit 660337f

4 files changed

Lines changed: 13 additions & 15 deletions

File tree

.cloud-build/Notebooks.txt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
intro_gemini_1_5_flash.ipynb
2-
intro_gemini_1_5_pro.ipynb
31
intro_gemini_2_0_flash.ipynb
42
intro_gemini_2_0_flash_lite.ipynb
5-
intro_gemini_2_0_flash_rest_api.ipynb
6-
intro_gemini_2_0_flash_thinking_mode.ipynb
7-
intro_gemini_2_0_pro.ipynb
3+
intro_gemini_2_0_image_gen.ipynb
4+
intro_gemini_2_5_flash.ipynb
5+
intro_gemini_2_5_pro.ipynb
86
intro_gemini_chat.ipynb
97
intro_gemini_curl.ipynb
108
intro_gemini_express.ipynb
11-
intro_gemini_pro_python.ipynb
12-
intro_gemini_pro_vision_python.ipynb
13-
intro_gemini_python.ipynb
149
intro_genai_sdk.ipynb

.cloud-build/linting/lint.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,24 @@
22
import subprocess
33

44
# Get the list of files in the directory
5-
TARGET = os.listdir('/workspace/generative-ai/gemini/getting-started')
5+
TARGET = os.listdir("/workspace/generative-ai/gemini/getting-started")
66

77
# Install dependencies
8-
subprocess.run(['pip', 'install', '-U', 'nbqa', 'flake8-nb', 'pylint'], check=True)
8+
subprocess.run(["pip", "install", "-U", "nbqa", "flake8-nb", "pylint"], check=True)
99

1010
# Loop through the files and run pylint and flake8
1111
for filename in TARGET:
1212
try:
1313
# Construct the full path to the notebook file
14-
notebook_path = os.path.join('/workspace/generative-ai/gemini/getting-started', filename)
14+
notebook_path = os.path.join(
15+
"/workspace/generative-ai/gemini/getting-started", filename
16+
)
1517

1618
# Run pylint on the notebook https://pypi.org/project/pylint/
17-
subprocess.run(['nbqa', 'pylint', notebook_path], check=True)
19+
subprocess.run(["nbqa", "pylint", notebook_path], check=True)
1820

1921
# Run flake8 on the notebook https://flake8-nb.readthedocs.io/en/latest/usage.html PEP8
20-
subprocess.run(['nbqa', 'flake8_nb', notebook_path], check=True)
22+
subprocess.run(["nbqa", "flake8_nb", notebook_path], check=True)
2123

2224
except subprocess.CalledProcessError as e:
23-
print(f"Error linting {filename}: {e}")
25+
print(f"Error linting {filename}: {e}")

.github/actions/spelling/allow.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,7 @@ nas
983983
nbconvert
984984
nbfmt
985985
nbformat
986+
nbqa
986987
nbviewer
987988
nce
988989
ncols

.github/actions/spelling/line_forbidden.patterns

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@
281281
\bVertex\sVector\sSearch\b
282282

283283
# Should be Colab
284-
\s(?!Colab)[Cc]o[Ll][Ll]?abs?\b
284+
\s(?!Colab)Co[Ll][Ll]?abs?\b
285285

286286
# Should be Kaggle
287287
\skaggle\b

0 commit comments

Comments
 (0)