Skip to content

Commit bd2a609

Browse files
author
Rafael Odon
committed
Linting and default parameter fix on MockDatabase
1 parent 8340805 commit bd2a609

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

libs/langchain-mongodb/langchain_mongodb/agent_toolkit/database.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ def __init__(
5757
)
5858
self._include_colls = set(include_collections or [])
5959
self._ignore_colls = set(ignore_collections or [])
60-
self._all_colls = set(self._db.list_collection_names(authorizedCollections=True))
60+
self._all_colls = set(
61+
self._db.list_collection_names(authorizedCollections=True)
62+
)
6163

6264
self._sample_docs_in_coll_info = sample_docs_in_collection_info
6365
self._indexes_in_coll_info = indexes_in_collection_info

libs/langchain-mongodb/tests/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ class MockDatabase:
238238
def __init__(self, client=None):
239239
self.client = client or MockClient()
240240

241-
def list_collection_names(self, authorizedCollections:bool) -> list[str]:
241+
def list_collection_names(self, authorizedCollections: bool = True) -> list[str]:
242242
return ["test"]
243243

244244
def __getitem__(self, key: str) -> Any:

0 commit comments

Comments
 (0)