diff --git a/docs/docs/integrations/providers/langchain_decorators.mdx b/docs/docs/integrations/providers/langchain_decorators.mdx index 1c80bcc2bfb..d719f90b298 100644 --- a/docs/docs/integrations/providers/langchain_decorators.mdx +++ b/docs/docs/integrations/providers/langchain_decorators.mdx @@ -205,7 +205,7 @@ For chat models is very useful to define prompt as a set of message templates... def simulate_conversation(human_input:str, agent_role:str="a pirate"): """ ## System message - - note the `:system` sufix inside the tag + - note the `:system` suffix inside the tag ``` diff --git a/libs/community/langchain_community/retrievers/google_cloud_documentai_warehouse.py b/libs/community/langchain_community/retrievers/google_cloud_documentai_warehouse.py index e0a403b87e2..b989cef5b02 100644 --- a/libs/community/langchain_community/retrievers/google_cloud_documentai_warehouse.py +++ b/libs/community/langchain_community/retrievers/google_cloud_documentai_warehouse.py @@ -32,7 +32,7 @@ class GoogleDocumentAIWarehouseRetriever(BaseRetriever): Documents should be created and documents should be uploaded in a separate flow, and this retriever uses only Document AI - schema_id provided to search for revelant documents. + schema_id provided to search for relevant documents. More info: https://cloud.google.com/document-ai-warehouse. """ diff --git a/libs/community/langchain_community/tools/e2b_data_analysis/unparse.py b/libs/community/langchain_community/tools/e2b_data_analysis/unparse.py index b924f927338..010e800fc66 100644 --- a/libs/community/langchain_community/tools/e2b_data_analysis/unparse.py +++ b/libs/community/langchain_community/tools/e2b_data_analysis/unparse.py @@ -543,7 +543,7 @@ class Unparser: "Is": "is", "IsNot": "is not", "In": "in", - "NotIn": "not in", + "NotIn": "not in", # codespell:ignore } def _Compare(self, t): diff --git a/libs/community/langchain_community/vectorstores/milvus.py b/libs/community/langchain_community/vectorstores/milvus.py index 28d1dcc0f8e..30a7d4cc406 100644 --- a/libs/community/langchain_community/vectorstores/milvus.py +++ b/libs/community/langchain_community/vectorstores/milvus.py @@ -62,7 +62,7 @@ class Milvus(VectorStore): primary_field (str): Name of the primary key field. Defaults to "pk". text_field (str): Name of the text field. Defaults to "text". vector_field (str): Name of the vector field. Defaults to "vector". - metadata_field (str): Name of the metadta field. Defaults to None. + metadata_field (str): Name of the metadata field. Defaults to None. When metadata_field is specified, the document's metadata will store as json. diff --git a/libs/community/tests/integration_tests/graphs/test_age_graph.py b/libs/community/tests/integration_tests/graphs/test_age_graph.py index 383ddb62f8d..12cba082ca5 100644 --- a/libs/community/tests/integration_tests/graphs/test_age_graph.py +++ b/libs/community/tests/integration_tests/graphs/test_age_graph.py @@ -330,7 +330,7 @@ class TestAGEGraph(unittest.TestCase): graph.refresh_schema() # check that schema is refreshed - self.assertIn( + self.assertIn( # codespell:ignore re.sub(r"\s", "", graph.get_schema), [re.sub(r"\s", "", x) for x in expected_possibilities], ) diff --git a/libs/community/tests/unit_tests/callbacks/fake_callback_handler.py b/libs/community/tests/unit_tests/callbacks/fake_callback_handler.py index 66b5425692b..be164fdf234 100644 --- a/libs/community/tests/unit_tests/callbacks/fake_callback_handler.py +++ b/libs/community/tests/unit_tests/callbacks/fake_callback_handler.py @@ -21,7 +21,7 @@ class BaseFakeCallbackHandler(BaseModel): ignore_retriever_: bool = False ignore_chat_model_: bool = False - # to allow for similar callback handlers that are not technicall equal + # to allow for similar callback handlers that are not technically equal fake_id: Union[str, None] = None # add finer-grained counters for easier debugging of failing tests diff --git a/libs/core/tests/unit_tests/fake/callbacks.py b/libs/core/tests/unit_tests/fake/callbacks.py index b2bef343fff..71a6dea0cef 100644 --- a/libs/core/tests/unit_tests/fake/callbacks.py +++ b/libs/core/tests/unit_tests/fake/callbacks.py @@ -1,4 +1,5 @@ """A fake callback handler for testing purposes.""" + from itertools import chain from typing import Any, Dict, List, Optional, Union from uuid import UUID @@ -22,7 +23,7 @@ class BaseFakeCallbackHandler(BaseModel): ignore_retriever_: bool = False ignore_chat_model_: bool = False - # to allow for similar callback handlers that are not technicall equal + # to allow for similar callback handlers that are not technically equal fake_id: Union[str, None] = None # add finer-grained counters for easier debugging of failing tests diff --git a/libs/langchain/langchain/evaluation/scoring/prompt.py b/libs/langchain/langchain/evaluation/scoring/prompt.py index 99f899824dc..259cded3969 100644 --- a/libs/langchain/langchain/evaluation/scoring/prompt.py +++ b/libs/langchain/langchain/evaluation/scoring/prompt.py @@ -1,6 +1,6 @@ """Prompts for scoring the outputs of a models for a given question. -This prompt is used to socre the responses and evaluate how it follows the instructions +This prompt is used to score the responses and evaluate how it follows the instructions and answers the question. The prompt is based on the paper from Zheng, et. al. https://arxiv.org/abs/2306.05685 """ diff --git a/libs/langchain/tests/unit_tests/callbacks/fake_callback_handler.py b/libs/langchain/tests/unit_tests/callbacks/fake_callback_handler.py index 2a2af92269f..fdef58e13ff 100644 --- a/libs/langchain/tests/unit_tests/callbacks/fake_callback_handler.py +++ b/libs/langchain/tests/unit_tests/callbacks/fake_callback_handler.py @@ -1,4 +1,5 @@ """A fake callback handler for testing purposes.""" + from itertools import chain from typing import Any, Dict, List, Optional, Union from uuid import UUID @@ -21,7 +22,7 @@ class BaseFakeCallbackHandler(BaseModel): ignore_retriever_: bool = False ignore_chat_model_: bool = False - # to allow for similar callback handlers that are not technicall equal + # to allow for similar callback handlers that are not technically equal fake_id: Union[str, None] = None # add finer-grained counters for easier debugging of failing tests diff --git a/libs/partners/anthropic/tests/unit_tests/_utils.py b/libs/partners/anthropic/tests/unit_tests/_utils.py index 3c053d2cc42..a39f31fc0f1 100644 --- a/libs/partners/anthropic/tests/unit_tests/_utils.py +++ b/libs/partners/anthropic/tests/unit_tests/_utils.py @@ -19,7 +19,7 @@ class BaseFakeCallbackHandler(BaseModel): ignore_retriever_: bool = False ignore_chat_model_: bool = False - # to allow for similar callback handlers that are not technicall equal + # to allow for similar callback handlers that are not technically equal fake_id: Union[str, None] = None # add finer-grained counters for easier debugging of failing tests diff --git a/libs/partners/openai/tests/unit_tests/fake/callbacks.py b/libs/partners/openai/tests/unit_tests/fake/callbacks.py index b2bef343fff..71a6dea0cef 100644 --- a/libs/partners/openai/tests/unit_tests/fake/callbacks.py +++ b/libs/partners/openai/tests/unit_tests/fake/callbacks.py @@ -1,4 +1,5 @@ """A fake callback handler for testing purposes.""" + from itertools import chain from typing import Any, Dict, List, Optional, Union from uuid import UUID @@ -22,7 +23,7 @@ class BaseFakeCallbackHandler(BaseModel): ignore_retriever_: bool = False ignore_chat_model_: bool = False - # to allow for similar callback handlers that are not technicall equal + # to allow for similar callback handlers that are not technically equal fake_id: Union[str, None] = None # add finer-grained counters for easier debugging of failing tests diff --git a/pyproject.toml b/pyproject.toml index b25a07f1029..88b413d2144 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,30 +58,29 @@ ipykernel = "^6.29.2" [tool.poetry.group.typing.dependencies] [tool.codespell] -skip = '.git,*.pdf,*.svg,*.pdf,*.yaml,*.ipynb,poetry.lock,*.min.js,*.css,package-lock.json,example_data,_dist,examples,templates,*.trig' +skip = '.git,*.pdf,*.svg,*.pdf,*.yaml,*.ipynb,poetry.lock,*.min.js,*.css,package-lock.json,example_data,_dist,examples,templates,*.trig,trulens.mdx' # Ignore latin etc ignore-regex = '.*(Stati Uniti|Tense=Pres).*' # whats is a typo but used frequently in queries so kept as is # aapply - async apply # unsecure - typo but part of API, decided to not bother for now -ignore-words-list = 'momento,collison,ned,foor,reworkd,parth,whats,aapply,mysogyny,unsecure,damon,crate,aadd,symbl,precesses,accademia,nin' +ignore-words-list = 'momento,collison,ned,foor,reworkd,parth,whats,aapply,mysogyny,unsecure,damon,crate,aadd,symbl,precesses,accademia,nin,checkin' [tool.ruff] extend-include = ["*.ipynb"] extend-exclude = [ - "docs/docs/expression_language/why.ipynb" # TODO: look into why linter errors + "docs/docs/expression_language/why.ipynb", # TODO: look into why linter errors ] [tool.ruff.lint.per-file-ignores] "**/{cookbook,docs}/*" = [ - "E402", # allow imports to appear anywhere in docs - "F401", # allow "imported but unused" example code - "F811", # allow re-importing the same module, so that cells can stay independent - "F841", # allow assignments to variables that are never read -- it's example code + "E402", # allow imports to appear anywhere in docs + "F401", # allow "imported but unused" example code + "F811", # allow re-importing the same module, so that cells can stay independent + "F841", # allow assignments to variables that are never read -- it's example code ] # These files were failing the listed rules at the time ruff was adopted for notebooks. # Don't require them to change at once, though we should look into them eventually. "cookbook/gymnasium_agent_simulation.ipynb" = ["F821"] "docs/docs/integrations/document_loaders/tensorflow_datasets.ipynb" = ["F821"] -