Skip to content

Commit 15f6020

Browse files
committed
LCORE-1375: minor updates in sources
1 parent 0e52627 commit 15f6020

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

src/llama_stack_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import os
99
from argparse import ArgumentParser
1010
from pathlib import Path
11-
from typing import Any
11+
from typing import Any, Optional
1212

1313
import yaml
1414
from azure.core.exceptions import ClientAuthenticationError
@@ -44,7 +44,7 @@ def increase_indent(self, flow: bool = False, indentless: bool = False) -> None:
4444

4545

4646
def setup_azure_entra_id_token(
47-
azure_config: dict[str, Any] | None, env_file: str
47+
azure_config: Optional[dict[str, Any]], env_file: str
4848
) -> None:
4949
"""Generate Azure Entra ID access token and write to .env file.
5050

src/observability/splunk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import platform
44
import time
5-
from typing import Any
5+
from typing import Any, Optional
66

77
import aiohttp
88

@@ -18,7 +18,7 @@ def _get_hostname() -> str:
1818
return platform.node() or "unknown"
1919

2020

21-
def _read_token_from_file(token_path: str) -> str | None:
21+
def _read_token_from_file(token_path: str) -> Optional[str]:
2222
"""Read HEC token from file path."""
2323
try:
2424
with open(token_path, encoding="utf-8") as f:

src/utils/mcp_oauth_probe.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Probe MCP server for OAuth and raise 401 with WWW-Authenticate when required."""
22

3+
from typing import Optional
34
import aiohttp
45
from fastapi import HTTPException
56

@@ -12,7 +13,7 @@
1213

1314
async def probe_mcp_oauth_and_raise_401(
1415
url: str,
15-
chain_from: BaseException | None = None,
16+
chain_from: Optional[BaseException] = None,
1617
) -> None:
1718
"""Probe MCP endpoint and raise 401 so the client can perform OAuth.
1819

src/utils/prompts.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
"""Utility functions for system prompts."""
22

3+
from typing import Optional
34
from fastapi import HTTPException
45

56
import constants
67
from configuration import configuration
78
from models.responses import UnprocessableEntityResponse
89

910

10-
def get_system_prompt(system_prompt: str | None) -> str:
11+
def get_system_prompt(system_prompt: Optional[str]) -> str:
1112
"""
1213
Resolve which system prompt to use for a query.
1314

0 commit comments

Comments
 (0)