chore: refactor not to use warnings.warn (#5730)

* refactor not to use warnings.warn

* temp circular import fix maybe unecessary/bnad

* fix Deprecation warning

* fix deprecation warning and mcp thing?

* revert changes to mcp server test

* fix deprecation warning
This commit is contained in:
Kian Jones
2025-10-23 22:05:37 -07:00
committed by Caren Thomas
parent c4c9d12f42
commit 704d3b2d79
25 changed files with 127 additions and 96 deletions

View File

@@ -1,5 +1,4 @@
import inspect
import warnings
from typing import Any, Dict, List, Optional, Tuple, Type, Union, get_args, get_origin
from docstring_parser import parse
@@ -101,7 +100,7 @@ def type_to_json_schema_type(py_type) -> dict:
args = get_args(py_type)
if len(args) == 0:
# is this correct
warnings.warn("Defaulting to string type for untyped List")
logger.warning("Defaulting to string type for untyped List")
return {
"type": "array",
"items": {"type": "string"},