@@ -523,24 +523,32 @@ async def test_get_field_unique_values(self, document_store: OpenSearchDocumentS
523523 assert lang_count == 3
524524
525525 # Test pagination - first page
526- unique_values_page1 , total_count = await document_store .get_field_unique_values_async ("meta.category" , None , 0 , 2 )
526+ unique_values_page1 , total_count = await document_store .get_field_unique_values_async (
527+ "meta.category" , None , 0 , 2
528+ )
527529 assert len (unique_values_page1 ) == 2
528530 assert total_count == 3
529531 assert all (val in ["A" , "B" , "C" ] for val in unique_values_page1 )
530532
531533 # Test pagination - second page
532- unique_values_page2 , total_count = await document_store .get_field_unique_values_async ("meta.category" , None , 2 , 2 )
534+ unique_values_page2 , total_count = await document_store .get_field_unique_values_async (
535+ "meta.category" , None , 2 , 2
536+ )
533537 assert len (unique_values_page2 ) == 1
534538 assert total_count == 3
535539 assert unique_values_page2 [0 ] in ["A" , "B" , "C" ]
536540
537541 # Test with search term - filter by content matching "Python"
538- unique_values_filtered , total_count = await document_store .get_field_unique_values_async ("meta.category" , "Python" , 0 , 10 )
542+ unique_values_filtered , total_count = await document_store .get_field_unique_values_async (
543+ "meta.category" , "Python" , 0 , 10
544+ )
539545 assert set (unique_values_filtered ) == {"A" } # Only category A has documents with "Python" in content
540546 assert total_count == 1
541547
542548 # Test with search term - filter by content matching "Java"
543- unique_values_java , total_count = await document_store .get_field_unique_values_async ("meta.category" , "Java" , 0 , 10 )
549+ unique_values_java , total_count = await document_store .get_field_unique_values_async (
550+ "meta.category" , "Java" , 0 , 10
551+ )
544552 assert set (unique_values_java ) == {"B" } # Only category B has documents with "Java" in content
545553 assert total_count == 1
546554
@@ -552,13 +560,15 @@ async def test_get_field_unique_values(self, document_store: OpenSearchDocumentS
552560 Document (content = "Doc 4" , meta = {"priority" : 3 }),
553561 ]
554562 await document_store .write_documents_async (int_docs )
555- unique_priorities , priority_count = await document_store .get_field_unique_values_async ("meta.priority" , None , 0 , 10 )
563+ unique_priorities , priority_count = await document_store .get_field_unique_values_async (
564+ "meta.priority" , None , 0 , 10
565+ )
556566 assert set (unique_priorities ) == {"1" , "2" , "3" }
557567 assert priority_count == 3
558568
559569 # Test with search term on integer field
560- unique_priorities_filtered , priority_count = await document_store .get_field_unique_values_async ("meta.priority" , "Doc 1" , 0 , 10 )
570+ unique_priorities_filtered , priority_count = await document_store .get_field_unique_values_async (
571+ "meta.priority" , "Doc 1" , 0 , 10
572+ )
561573 assert set (unique_priorities_filtered ) == {"1" }
562574 assert priority_count == 1
563-
564-
0 commit comments