@@ -72,7 +72,6 @@ def __contains__(self, collection_name: str) -> bool:
7272 """
7373 if collection_name in self .collections :
7474 try : # noqa: WPS229, WPS529
75-
7675 self .collections [collection_name ].retrieve () # noqa: WPS529
7776 return True
7877 except Exception :
@@ -100,7 +99,7 @@ def __getitem__(self, collection_name: str) -> Collection[TDoc]:
10099
101100 Example:
102101 >>> collections = Collections(api_call)
103- >>> fruits_collection = collections[' fruits' ]
102+ >>> fruits_collection = collections[" fruits" ]
104103 """
105104 if not self .collections .get (collection_name ):
106105 self .collections [collection_name ] = Collection (
@@ -126,11 +125,11 @@ def create(self, schema: CollectionCreateSchema) -> CollectionSchema:
126125 >>> schema = {
127126 ... "name": "companies",
128127 ... "fields": [
129- ... {"name": "company_name", "type": "string" },
130- ... {"name": "num_employees", "type": "int32" },
131- ... {"name": "country", "type": "string", "facet": True }
128+ ... {"name": "company_name", "type": "string"},
129+ ... {"name": "num_employees", "type": "int32"},
130+ ... {"name": "country", "type": "string", "facet": True},
132131 ... ],
133- ... "default_sorting_field": "num_employees"
132+ ... "default_sorting_field": "num_employees",
134133 ... }
135134 >>> created_schema = collections.create(schema)
136135 """
@@ -154,7 +153,7 @@ def retrieve(self) -> typing.List[CollectionSchema]:
154153 >>> collections = Collections(api_call)
155154 >>> all_collections = collections.retrieve()
156155 >>> for collection in all_collections:
157- ... print(collection[' name' ])
156+ ... print(collection[" name" ])
158157 """
159158 call : typing .List [CollectionSchema ] = self .api_call .get (
160159 endpoint = Collections .resource_path ,
0 commit comments