Skip to content

Commit 9723b29

Browse files
authored
style: Reformat code to fix build (#1067)
1 parent c2672fd commit 9723b29

File tree

9 files changed

+29
-10
lines changed

9 files changed

+29
-10
lines changed

code/backend/Admin.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@
3131
menu_items=None,
3232
)
3333

34+
3435
def load_css(file_path):
3536
with open(file_path) as f:
3637
st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
3738

39+
3840
# Load the common CSS
3941
load_css("pages/common.css")
4042

code/backend/batch/utilities/helpers/env_helper.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,7 @@ def __load_config(self, **kwargs) -> None:
227227
"LOAD_CONFIG_FROM_BLOB_STORAGE"
228228
)
229229

230-
self.AZURE_ML_WORKSPACE_NAME = os.getenv(
231-
"AZURE_ML_WORKSPACE_NAME", ""
232-
)
230+
self.AZURE_ML_WORKSPACE_NAME = os.getenv("AZURE_ML_WORKSPACE_NAME", "")
233231

234232
self.PROMPT_FLOW_ENDPOINT_NAME = os.getenv("PROMPT_FLOW_ENDPOINT_NAME", "")
235233

code/backend/pages/01_Ingest_Data.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@
2020
menu_items=None,
2121
)
2222

23+
2324
def load_css(file_path):
2425
with open(file_path) as f:
2526
st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
2627

28+
2729
# Load the common CSS
2830
load_css("pages/common.css")
2931

32+
3033
def reprocess_all():
3134
backend_url = urllib.parse.urljoin(
3235
env_helper.BACKEND_URL, "/api/BatchStartProcessing"

code/backend/pages/02_Explore_Data.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@
2727
# Inject CSS with Markdown
2828
st.markdown(hide_table_row_index, unsafe_allow_html=True)
2929

30+
3031
def load_css(file_path):
3132
with open(file_path) as f:
3233
st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
3334

35+
3436
# Load the common CSS
3537
load_css("pages/common.css")
3638

code/backend/pages/03_Delete_Data.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818
menu_items=None,
1919
)
2020

21+
2122
def load_css(file_path):
2223
with open(file_path) as f:
2324
st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
2425

26+
2527
# Load the common CSS
2628
load_css("pages/common.css")
2729

code/backend/pages/04_Configuration.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818
menu_items=None,
1919
)
2020

21+
2122
def load_css(file_path):
2223
with open(file_path) as f:
2324
st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
2425

26+
2527
# Load the common CSS
2628
load_css("pages/common.css")
2729

code/tests/functional/tests/functions/advanced_image_processing/test_advanced_image_processing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ def test_image_passed_to_llm_to_generate_caption(
192192
),
193193
)[0]
194194

195-
assert request.get_json()["messages"][1]["content"][1]["image_url"]["url"].startswith(
195+
assert request.get_json()["messages"][1]["content"][1]["image_url"][
196+
"url"
197+
].startswith(
196198
f"{app_config.get('AZURE_STORAGE_ACCOUNT_ENDPOINT')}{app_config.get('AZURE_BLOB_CONTAINER_NAME')}/{FILE_NAME}"
197199
)
198200

code/tests/utilities/helpers/test_llm_helper.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,12 @@ def test_generate_embeddings_returns_embeddings(azure_openai_mock):
138138
# then
139139
assert actual_embeddings == expected_embeddings
140140

141-
@patch('backend.batch.utilities.helpers.llm_helper.DefaultAzureCredential')
142-
@patch('backend.batch.utilities.helpers.llm_helper.MLClient')
141+
142+
@patch("backend.batch.utilities.helpers.llm_helper.DefaultAzureCredential")
143+
@patch("backend.batch.utilities.helpers.llm_helper.MLClient")
143144
def test_get_ml_client_initializes_with_expected_parameters(
144-
mock_ml_client, mock_default_credential, env_helper_mock):
145+
mock_ml_client, mock_default_credential, env_helper_mock
146+
):
145147
# given
146148
llm_helper = LLMHelper()
147149

@@ -153,5 +155,5 @@ def test_get_ml_client_initializes_with_expected_parameters(
153155
mock_default_credential.return_value,
154156
env_helper_mock.AZURE_SUBSCRIPTION_ID,
155157
env_helper_mock.AZURE_RESOURCE_GROUP,
156-
env_helper_mock.AZURE_ML_WORKSPACE_NAME
158+
env_helper_mock.AZURE_ML_WORKSPACE_NAME,
157159
)

code/tests/utilities/tools/test_question_answer_tool.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,10 @@ def test_use_advanced_vision_processing(env_helper_mock, llm_helper_mock):
339339
"type": "text",
340340
"text": 'Sources: {"retrieved_documents":[{"[doc1]":{"content":"mock content"}},{"[doc2]":{"content":"mock content 2"}}]}, Question: mock question',
341341
},
342-
{"type": "image_url", "image_url": {"url": "mock source 2mock sas"}},
342+
{
343+
"type": "image_url",
344+
"image_url": {"url": "mock source 2mock sas"},
345+
},
343346
],
344347
"role": "user",
345348
},
@@ -411,7 +414,10 @@ def test_limit_number_of_images_passed_to_llm(
411414
"type": "text",
412415
"text": 'Sources: {"retrieved_documents":[{"[doc1]":{"content":"mock content"}},{"[doc2]":{"content":"mock content 2"}},{"[doc3]":{"content":"mock content 3"}}]}, Question: mock question',
413416
},
414-
{"type": "image_url", "image_url": {"url": "mock source 2mock sas"}},
417+
{
418+
"type": "image_url",
419+
"image_url": {"url": "mock source 2mock sas"},
420+
},
415421
],
416422
"role": "user",
417423
},

0 commit comments

Comments
 (0)