MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / _normalize_str

Function _normalize_str

src/core/model_resolver.py:417–421  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

415 (aspect_ratio, image_size) 归一化后的值
416 """
417 def _normalize_str(value: Any) -> Optional[str]:
418 if not isinstance(value, str):
419 return None
420 text = value.strip()
421 return text if text else None
422
423 def _read_value(obj: Any, *keys: str) -> Any:
424 if obj is None:

Callers 4

_normalize_aspect_ratioFunction · 0.85
_normalize_image_sizeFunction · 0.85
_aspect_from_openai_sizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected