Skip to content

Commit

Permalink
fmt and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-tzayats committed Dec 9, 2024
1 parent 4d15fde commit 59f0586
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def failed_connection_popup() -> None:
Renders a dialog box detailing that the credentials provided could not be used to connect to Snowflake.
"""
st.markdown(
f"""It looks like the credentials provided could not be used to connect to the account."""
"""It looks like the credentials provided could not be used to connect to the account."""
)
st.stop()

Expand Down
2 changes: 1 addition & 1 deletion app_utils/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def send_message(

resp = _snowflake.send_snow_api_request( # type: ignore
"POST",
f"/api/v2/cortex/analyst/message",
"/api/v2/cortex/analyst/message",
{},
{},
request_body,
Expand Down
2 changes: 1 addition & 1 deletion journeys/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,5 +603,5 @@ def generate_hash(input_object: Any) -> str:
output_hash = hashlib.md5(text.encode()).hexdigest()
except Exception as e:
logger.error(f"Error generating hash: {e}")
output_hash = hash(input_object)
output_hash = str(hash(input_object))
return output_hash
13 changes: 5 additions & 8 deletions journeys/iteration.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
from streamlit import config

# Set minCachedMessageSize to 500 MB to disable forward message cache:
# st.set_config would trigger an error, only the set_config from config module works
config.set_option("global.minCachedMessageSize", 500 * 1e6)
import json
import re
import time
from textwrap import dedent
from typing import Any, Dict, List, Optional

import pandas as pd
import sqlglot
import streamlit as st
from snowflake.connector import ProgrammingError, SnowflakeConnection
from snowflake.connector.pandas_tools import write_pandas
from streamlit import config
from streamlit.delta_generator import DeltaGenerator
from streamlit_extras.row import row
from streamlit_extras.stylable_container import stylable_container
Expand Down Expand Up @@ -47,6 +40,10 @@
from semantic_model_generator.protos import semantic_model_pb2
from semantic_model_generator.validate_model import validate

# Set minCachedMessageSize to 500 MB to disable forward message cache:
# st.set_config would trigger an error, only the set_config from config module works
config.set_option("global.minCachedMessageSize", 500 * 1e6)


@st.cache_data(show_spinner=False)
def pretty_print_sql(sql: str) -> str:
Expand Down
1 change: 0 additions & 1 deletion partner/dbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from snowflake.connector import ProgrammingError

from app_utils.shared_utils import (
SnowflakeStage,
download_yaml,
get_snowflake_connection,
get_yamls_from_stage,
Expand Down
3 changes: 0 additions & 3 deletions semantic_model_generator/validate_model.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import json
import re

from snowflake.connector import SnowflakeConnection

from app_utils.chat import send_message
Expand Down

0 comments on commit 59f0586

Please sign in to comment.