haive.core.schema.compatibility.analyzerΒΆ

Advanced type analysis engine for deep type introspection.

ClassesΒΆ

TypeAnalyzer

Advanced type analysis with caching and deep introspection.

Module ContentsΒΆ

class haive.core.schema.compatibility.analyzer.TypeAnalyzer(cache_size=1000)[source]ΒΆ

Advanced type analysis with caching and deep introspection.

Initialize analyzer with cache.

Parameters:

cache_size (int)

analyze_schema(schema_type)[source]ΒΆ

Analyze a Pydantic BaseModel schema.

Parameters:

schema_type (type[pydantic.BaseModel])

Return type:

haive.core.schema.compatibility.types.SchemaInfo

get_generic_parameters(type_hint)[source]ΒΆ

Extract generic type parameters.

Parameters:

type_hint (type[Any])

Return type:

dict[str, type[Any]]

is_subtype(subtype, supertype)[source]ΒΆ

Check if subtype is a subtype of supertype.

Parameters:
  • subtype (type[Any])

  • supertype (type[Any])

Return type:

bool

resolve_forward_refs(type_hint, globalns=None, localns=None)[source]ΒΆ

Resolve forward references in a type hint.

Parameters:
Return type:

type[Any]