@@ -63,9 +63,7 @@ def assert_result_equals(
6363 assert set (cnx .cursor ().execute (sql ).fetchall ()) == set (expected_data )
6464
6565
66- def test_fix_snow_746341 (
67- conn_cnx : Callable [..., Generator [SnowflakeConnection , None , None ]]
68- ):
66+ def test_fix_snow_746341 (conn_cnx : Callable [..., Generator [SnowflakeConnection ]]):
6967 cat = '"cat"'
7068 df = pandas .DataFrame ([[1 ], [2 ]], columns = [f"col_'{ cat } '" ])
7169 table_name = random_string (5 , "snow746341_" )
@@ -83,7 +81,7 @@ def test_fix_snow_746341(
8381@pytest .mark .parametrize ("auto_create_table" , [True , False ])
8482@pytest .mark .parametrize ("index" , [False ])
8583def test_write_pandas_with_overwrite (
86- conn_cnx : Callable [..., Generator [SnowflakeConnection , None , None ]],
84+ conn_cnx : Callable [..., Generator [SnowflakeConnection ]],
8785 quote_identifiers : bool ,
8886 auto_create_table : bool ,
8987 index : bool ,
@@ -225,7 +223,7 @@ def test_write_pandas_with_overwrite(
225223@pytest .mark .parametrize ("create_temp_table" , [True , False ])
226224@pytest .mark .parametrize ("index" , [False ])
227225def test_write_pandas (
228- conn_cnx : Callable [..., Generator [SnowflakeConnection , None , None ]],
226+ conn_cnx : Callable [..., Generator [SnowflakeConnection ]],
229227 db_parameters : dict [str , str ],
230228 compression : str ,
231229 chunk_size : int ,
@@ -296,7 +294,7 @@ def test_write_pandas(
296294
297295
298296def test_write_non_range_index_pandas (
299- conn_cnx : Callable [..., Generator [SnowflakeConnection , None , None ]],
297+ conn_cnx : Callable [..., Generator [SnowflakeConnection ]],
300298 db_parameters : dict [str , str ],
301299):
302300 compression = "gzip"
@@ -376,7 +374,7 @@ def test_write_non_range_index_pandas(
376374
377375@pytest .mark .parametrize ("table_type" , ["" , "temp" , "temporary" , "transient" ])
378376def test_write_pandas_table_type (
379- conn_cnx : Callable [..., Generator [SnowflakeConnection , None , None ]],
377+ conn_cnx : Callable [..., Generator [SnowflakeConnection ]],
380378 table_type : str ,
381379):
382380 with conn_cnx () as cnx :
@@ -408,7 +406,7 @@ def test_write_pandas_table_type(
408406
409407
410408def test_write_pandas_create_temp_table_deprecation_warning (
411- conn_cnx : Callable [..., Generator [SnowflakeConnection , None , None ]],
409+ conn_cnx : Callable [..., Generator [SnowflakeConnection ]],
412410):
413411 with conn_cnx () as cnx :
414412 table_name = random_string (5 , "driver_versions_" )
@@ -436,7 +434,7 @@ def test_write_pandas_create_temp_table_deprecation_warning(
436434
437435@pytest .mark .parametrize ("use_logical_type" , [None , True , False ])
438436def test_write_pandas_use_logical_type (
439- conn_cnx : Callable [..., Generator [SnowflakeConnection , None , None ]],
437+ conn_cnx : Callable [..., Generator [SnowflakeConnection ]],
440438 use_logical_type : bool | None ,
441439):
442440 table_name = random_string (5 , "USE_LOCAL_TYPE_" ).upper ()
@@ -483,7 +481,7 @@ def test_write_pandas_use_logical_type(
483481
484482
485483def test_invalid_table_type_write_pandas (
486- conn_cnx : Callable [..., Generator [SnowflakeConnection , None , None ]],
484+ conn_cnx : Callable [..., Generator [SnowflakeConnection ]],
487485):
488486 with conn_cnx () as cnx :
489487 with pytest .raises (ValueError , match = "Unsupported table type" ):
@@ -496,7 +494,7 @@ def test_invalid_table_type_write_pandas(
496494
497495
498496def test_empty_dataframe_write_pandas (
499- conn_cnx : Callable [..., Generator [SnowflakeConnection , None , None ]],
497+ conn_cnx : Callable [..., Generator [SnowflakeConnection ]],
500498):
501499 table_name = random_string (5 , "empty_dataframe_" )
502500 df = pandas .DataFrame ([], columns = ["name" , "balance" ])
@@ -720,7 +718,7 @@ def mocked_execute(*args, **kwargs):
720718
721719@pytest .mark .parametrize ("quote_identifiers" , [True , False ])
722720def test_default_value_insertion (
723- conn_cnx : Callable [..., Generator [SnowflakeConnection , None , None ]],
721+ conn_cnx : Callable [..., Generator [SnowflakeConnection ]],
724722 quote_identifiers : bool ,
725723):
726724 """Tests whether default values can be successfully inserted with the pandas writeback."""
@@ -774,7 +772,7 @@ def test_default_value_insertion(
774772
775773@pytest .mark .parametrize ("quote_identifiers" , [True , False ])
776774def test_autoincrement_insertion (
777- conn_cnx : Callable [..., Generator [SnowflakeConnection , None , None ]],
775+ conn_cnx : Callable [..., Generator [SnowflakeConnection ]],
778776 quote_identifiers : bool ,
779777):
780778 """Tests whether default values can be successfully inserted with the pandas writeback."""
@@ -828,7 +826,7 @@ def test_autoincrement_insertion(
828826 ],
829827)
830828def test_special_name_quoting (
831- conn_cnx : Callable [..., Generator [SnowflakeConnection , None , None ]],
829+ conn_cnx : Callable [..., Generator [SnowflakeConnection ]],
832830 auto_create_table : bool ,
833831 column_names : list [str ],
834832):
@@ -875,7 +873,7 @@ def test_special_name_quoting(
875873
876874
877875def test_auto_create_table_similar_column_names (
878- conn_cnx : Callable [..., Generator [SnowflakeConnection , None , None ]],
876+ conn_cnx : Callable [..., Generator [SnowflakeConnection ]],
879877):
880878 """Tests whether similar names do not cause issues when auto-creating a table as expected."""
881879 table_name = random_string (5 , "numbas_" )
@@ -905,9 +903,7 @@ def test_auto_create_table_similar_column_names(
905903 cnx .execute_string (drop_sql )
906904
907905
908- def test_all_pandas_types (
909- conn_cnx : Callable [..., Generator [SnowflakeConnection , None , None ]]
910- ):
906+ def test_all_pandas_types (conn_cnx : Callable [..., Generator [SnowflakeConnection ]]):
911907 table_name = random_string (5 , "all_types_" )
912908 datetime_with_tz = datetime (1997 , 6 , 3 , 14 , 21 , 32 , 00 , tzinfo = timezone .utc )
913909 datetime_with_ntz = datetime (1997 , 6 , 3 , 14 , 21 , 32 , 00 )
@@ -979,7 +975,7 @@ def test_all_pandas_types(
979975
980976@pytest .mark .parametrize ("object_type" , ["STAGE" , "FILE FORMAT" ])
981977def test_no_create_internal_object_privilege_in_target_schema (
982- conn_cnx : Callable [..., Generator [SnowflakeConnection , None , None ]],
978+ conn_cnx : Callable [..., Generator [SnowflakeConnection ]],
983979 caplog ,
984980 object_type ,
985981):
0 commit comments