docs: notebook linting (#14366)

Many jupyter notebooks didn't pass linting. List of these files are
presented in the [tool.ruff.lint.per-file-ignores] section of the
pyproject.toml . Addressed these bugs:
- fixed bugs; added missed imports; updated pyproject.toml
 Only the `document_loaders/tensorflow_datasets.ipyn`,
`cookbook/gymnasium_agent_simulation.ipynb` are not completely fixed.
I'm not sure about imports.

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
Leonid Ganeline
2023-12-07 15:47:48 -08:00
committed by GitHub
parent 52052cc7b9
commit 18aba7fdef
38 changed files with 244 additions and 142 deletions

View File

@@ -187,7 +187,7 @@
" for key in path:\n",
" try:\n",
" current = current[key]\n",
" except:\n",
" except KeyError:\n",
" return None\n",
" return current\n",
"\n",