# `Dspy.SignatureMeta`
[🔗](https://github.com/nshkrdotcom/dspex/blob/v0.11.0/lib/snakebridge_generated/dspy/signature_meta.ex#L7)

Wrapper for Python class SignatureMeta.

# `t`

```elixir
@opaque t()
```

# `_abc_caches_clear`

```elixir
@spec _abc_caches_clear(
  SnakeBridge.Ref.t(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Clear the caches (for debugging or testing).

## Returns

- `term()`

# `_abc_registry_clear`

```elixir
@spec _abc_registry_clear(
  SnakeBridge.Ref.t(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Clear the registry (for debugging or testing).

## Returns

- `term()`

# `_collect_bases_data`

```elixir
@spec _collect_bases_data(SnakeBridge.Ref.t(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python method `SignatureMeta._collect_bases_data`.

## Parameters

- `bases` (term())

## Returns

- `term()`

# `_detect_custom_types_from_caller`

```elixir
@spec _detect_custom_types_from_caller(SnakeBridge.Ref.t(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

Detect custom types from the caller's frame based on the signature string.

Note: This method relies on Python's frame introspection which has some limitations:
1. May not work in all Python implementations (e.g., compiled with optimizations)
2. Looks up a limited number of frames in the call stack
3. Cannot find types that are imported but not in the caller's namespace

For more reliable custom type resolution, explicitly provide types using the
`custom_types` parameter when creating a Signature.

## Parameters

- `signature_str` (term())

## Returns

- `term()`

# `_dump_registry`

```elixir
@spec _dump_registry(SnakeBridge.Ref.t(), [term()], keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

Debug helper to print the ABC registry.

## Parameters

- `file` (term() default: None)

## Returns

- `term()`

# `_get_fields_with_type`

```elixir
@spec _get_fields_with_type(SnakeBridge.Ref.t(), term(), keyword()) ::
  {:ok, %{optional(String.t()) =&gt; term()}} | {:error, Snakepit.Error.t()}
```

Python method `SignatureMeta._get_fields_with_type`.

## Parameters

- `field_type` (term())

## Returns

- `%{optional(String.t()) => term()}`

# `_validate_fields`

```elixir
@spec _validate_fields(
  SnakeBridge.Ref.t(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python method `SignatureMeta._validate_fields`.

## Returns

- `term()`

# `fields`

```elixir
@spec fields(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `input_fields`

```elixir
@spec input_fields(SnakeBridge.Ref.t()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `instructions`

```elixir
@spec instructions(SnakeBridge.Ref.t()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `mro`

```elixir
@spec mro(
  SnakeBridge.Ref.t(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

Return a type's method resolution order.

## Returns

- `term()`

# `new`

```elixir
@spec new(
  [term()],
  keyword()
) :: {:ok, SnakeBridge.Ref.t()} | {:error, Snakepit.Error.t()}
```

Initialize self.  See help(type(self)) for accurate signature.

## Parameters

- `args` (term())
- `kwargs` (term())

# `output_fields`

```elixir
@spec output_fields(SnakeBridge.Ref.t()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `register`

```elixir
@spec register(SnakeBridge.Ref.t(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

## Parameters

- `subclass` (term())

## Returns

- `term()`

# `signature`

```elixir
@spec signature(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
