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

Function _read_value

src/core/model_resolver.py:423–442  ·  view source on GitHub ↗
(obj: Any, *keys: str)

Source from the content-addressed store, hash-verified

421 return text if text else None
422
423 def _read_value(obj: Any, *keys: str) -> Any:
424 if obj is None:
425 return None
426 if isinstance(obj, dict):
427 for key in keys:
428 if key in obj:
429 return obj.get(key)
430 return None
431
432 for key in keys:
433 if hasattr(obj, key):
434 value = getattr(obj, key, None)
435 if value is not None:
436 return value
437
438 extra = getattr(obj, "__pydantic_extra__", None) or {}
439 for key in keys:
440 if key in extra:
441 return extra.get(key)
442 return None
443
444 def _normalize_aspect_ratio(value: Any) -> Optional[str]:
445 raw = _normalize_str(value)

Callers 2

_apply_image_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected