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:
@@ -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"},
|
||||
|
||||
Reference in New Issue
Block a user