|
12 | 12 | AggregateDate, |
13 | 13 | AggregateInteger, |
14 | 14 | AggregateNumber, |
15 | | - AggregateText, |
16 | 15 | AggregateReturn, |
17 | | - Metrics, |
| 16 | + AggregateText, |
18 | 17 | GroupByAggregate, |
| 18 | + Metrics, |
19 | 19 | ) |
20 | | -from weaviate.collections.classes.config import DataType, Property, ReferenceProperty, Configure |
| 20 | +from weaviate.collections.classes.config import Configure, DataType, Property, ReferenceProperty |
21 | 21 | from weaviate.collections.classes.filters import Filter, _Filters |
| 22 | +from weaviate.collections.classes.grpc import Move |
| 23 | +from weaviate.collections.classes.tenants import Tenant |
22 | 24 | from weaviate.exceptions import ( |
23 | 25 | WeaviateInvalidInputError, |
24 | 26 | WeaviateQueryError, |
25 | 27 | WeaviateUnsupportedFeatureError, |
26 | 28 | ) |
27 | 29 | from weaviate.util import file_encoder_b64 |
28 | 30 |
|
29 | | -from weaviate.collections.classes.grpc import Move |
30 | | - |
31 | | -from weaviate.collections.classes.tenants import Tenant |
32 | | - |
33 | 31 | UUID1 = uuid.UUID("8ad0d33c-8db1-4437-87f3-72161ca2a51a") |
34 | 32 | UUID2 = uuid.UUID("577887c1-4c6b-5594-aa62-f0c17883d9cf") |
35 | 33 |
|
@@ -201,7 +199,7 @@ def test_over_all_with_filters_ref(collection_factory: CollectionFactory) -> Non |
201 | 199 | assert res.properties["text"].count == 1 |
202 | 200 | assert res.properties["text"].top_occurrences[0].value == "two" |
203 | 201 |
|
204 | | - query = lambda: collection.aggregate.over_all( |
| 202 | + query = lambda: collection.aggregate.over_all( # noqa: E731 |
205 | 203 | filters=Filter.by_ref("ref").by_property("text").equal("one"), |
206 | 204 | return_metrics=[Metrics("text").text(count=True, top_occurrences_value=True)], |
207 | 205 | ) |
@@ -363,7 +361,7 @@ def test_hybrid_aggregation_group_by( |
363 | 361 | collection.data.insert({"text": text_1}) |
364 | 362 | collection.data.insert({"text": text_2}) |
365 | 363 |
|
366 | | - querier = lambda: collection.aggregate.hybrid( |
| 364 | + querier = lambda: collection.aggregate.hybrid( # noqa: E731 |
367 | 365 | "text", |
368 | 366 | alpha=0, |
369 | 367 | query_properties=["text"], |
@@ -400,7 +398,7 @@ def test_hybrid_aggregation_group_by_with_named_vectors( |
400 | 398 | collection.data.insert({"text": text_1}) |
401 | 399 | collection.data.insert({"text": text_2}) |
402 | 400 |
|
403 | | - querier = lambda: collection.aggregate.hybrid( |
| 401 | + querier = lambda: collection.aggregate.hybrid( # noqa: E731 |
404 | 402 | "text", |
405 | 403 | alpha=0, |
406 | 404 | query_properties=["text"], |
@@ -434,7 +432,7 @@ def test_hybrid_aggregation_group_by_with_named_vectors( |
434 | 432 | def test_near_vector_aggregation( |
435 | 433 | collection_factory: CollectionFactory, option: dict, expected_len: int |
436 | 434 | ) -> None: |
437 | | - collection_maker = lambda: collection_factory( |
| 435 | + collection_maker = lambda: collection_factory( # noqa: E731 |
438 | 436 | properties=[Property(name="text", data_type=DataType.TEXT)], |
439 | 437 | vectorizer_config=Configure.Vectorizer.text2vec_contextionary( |
440 | 438 | vectorize_collection_name=False |
|
0 commit comments