1515
1616
1717@pytest .fixture (scope = "session" )
18- def blob_with_data_container_name (blob_service_client ):
18+ def blob_with_data_container_name (blob_service_client : BlobServiceClient ):
1919 # create a storage container and upload some data
2020 container_name = "container-with-data"
2121 blob_service_client .create_container (container_name )
@@ -27,7 +27,7 @@ def blob_with_data_container_name(blob_service_client):
2727
2828
2929@pytest .fixture (scope = "session" )
30- def blob_service_client ():
30+ def blob_service_client () -> Generator [ BlobServiceClient , None , None ] :
3131 blob_service_client = BlobServiceClient .from_connection_string (
3232 os .environ ["STORAGE_CONNECTION_STRING" ]
3333 )
@@ -36,7 +36,7 @@ def blob_service_client():
3636
3737
3838@pytest .fixture (scope = "session" )
39- def cosmos_client ():
39+ def cosmos_client () -> Generator [ CosmosClient , None , None ] :
4040 """ "Initializes the CosmosDB databases that graphrag expects at startup time."""
4141 # setup
4242 client = CosmosClient .from_connection_string (os .environ ["COSMOS_CONNECTION_STRING" ])
@@ -53,7 +53,9 @@ def cosmos_client():
5353
5454
5555@pytest .fixture (scope = "session" )
56- def container_with_graphml_file (blob_service_client , cosmos_client ):
56+ def container_with_graphml_file (
57+ blob_service_client : BlobServiceClient , cosmos_client : CosmosClient
58+ ):
5759 """create a storage container and upload a fake graphml file"""
5860 container_name = "container-with-graphml"
5961 sanitized_name = sanitize_name (container_name )
@@ -79,7 +81,9 @@ def container_with_graphml_file(blob_service_client, cosmos_client):
7981
8082
8183@pytest .fixture (scope = "session" )
82- def container_with_index_files (blob_service_client , cosmos_client ):
84+ def container_with_index_files (
85+ blob_service_client : BlobServiceClient , cosmos_client : CosmosClient
86+ ):
8387 """create a storage container and upload a set of parquet files associated with a valid index"""
8488 container_name = "container-with-index-files"
8589 sanitized_name = sanitize_name (container_name )
@@ -122,6 +126,6 @@ def container_with_index_files(blob_service_client, cosmos_client):
122126
123127
124128@pytest .fixture (scope = "session" )
125- def client (request ) -> Generator :
129+ def client (request ) -> Generator [ TestClient , None , None ] :
126130 with TestClient (app ) as c :
127131 yield c
0 commit comments