44import string
55from logging import getLogger
66from tempfile import TemporaryDirectory
7- from typing import Dict , Iterator , List , Optional , Tuple , cast , Any
7+ from typing import Any , Dict , Iterator , List , Optional , Tuple , cast
88
99import pandas as pd
1010from cryptography .hazmat .backends import default_backend
@@ -42,8 +42,8 @@ def execute_snowflake_statement(conn: SnowflakeConnection, query) -> SnowflakeCu
4242
4343
4444def get_snowflake_conn (config , autocommit = True ) -> SnowflakeConnection :
45- if config .type == "snowflake.offline" :
46- config_header = "connections.feast_offline_store"
45+ assert config .type == "snowflake.offline"
46+ config_header = "connections.feast_offline_store"
4747
4848 config_dict = dict (config )
4949
@@ -68,8 +68,8 @@ def get_snowflake_conn(config, autocommit=True) -> SnowflakeConnection:
6868 else :
6969 kwargs ["schema" ] = '"PUBLIC"'
7070
71- #https://docs.snowflake.com/en/user-guide/python-connector-example.html#using-key-pair-authentication-key-pair-rotation
72- #https://docs.snowflake.com/en/user-guide/key-pair-auth.html#configuring-key-pair-authentication
71+ # https://docs.snowflake.com/en/user-guide/python-connector-example.html#using-key-pair-authentication-key-pair-rotation
72+ # https://docs.snowflake.com/en/user-guide/key-pair-auth.html#configuring-key-pair-authentication
7373 if "private_key" in kwargs :
7474 kwargs ["private_key" ] = parse_private_key_path (
7575 kwargs ["private_key" ], kwargs ["private_key_passphrase" ]
0 commit comments