Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-melnacouzi committed Dec 3, 2024
1 parent fce7d76 commit c393435
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/snowflake/cli/_plugins/connection/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ def get_ui_parameters(conn: SnowflakeConnection) -> Dict[UIParameter, Any]:

parameters_to_fetch = [param.value for param in UIParameter]

# Parsing of the Json and the filtering is happening here in Snowflake CLI
# in order to avoid requiring a warehouse in Snowflake
query = "call system$bootstrap_data_request('CLIENT_PARAMS_INFO')"
*_, cursor = conn.execute_string(query)

Expand Down
3 changes: 1 addition & 2 deletions src/snowflake/cli/_plugins/nativeapp/sf_sql_facade.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from textwrap import dedent
from typing import Any, Dict, List

from snowflake.cli._plugins.connection.util import UIParameter, get_ui_parameter
from snowflake.cli._plugins.nativeapp.constants import (
AUTHORIZE_TELEMETRY_COL,
NAME_COL,
Expand All @@ -26,8 +27,6 @@
from snowflake.cli._plugins.nativeapp.same_account_install_method import (
SameAccountInstallMethod,
)
from snowflake.cli._plugins.connection.util import UIParameter, get_ui_parameter
from snowflake.cli._plugins.nativeapp.constants import SPECIAL_COMMENT
from snowflake.cli._plugins.nativeapp.sf_facade_constants import UseObjectType
from snowflake.cli._plugins.nativeapp.sf_facade_exceptions import (
CREATE_OR_UPGRADE_APPLICATION_EXPECTED_USER_ERROR_CODES,
Expand Down
4 changes: 2 additions & 2 deletions src/snowflake/cli/api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ def get_config_value(*path, key: str, default: Optional[Any] = Empty) -> Any:
raise


def get_config_bool_value(*path, key: str, default: Any = Empty) -> bool | None:
def get_config_bool_value(*path, key: str, default: Optional[bool]) -> Optional[bool]:
value = get_config_value(*path, key=key, default=None)

if value is None and default is not Empty:
if value is None:
return default

try:
Expand Down

0 comments on commit c393435

Please sign in to comment.