# lawref.amend_enum

*module*

Шаблон enum-исключения и соседние входы amend (DECISION-0178).

Здесь только структурные операции: применение сравнения [§94](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/15-part-xiv-rules.ru.md#94-общая-форма) и проверку
сохранения исходов выполняет обычный evaluate. Сочетания нескольких осей,
алиасы enum-типов и значения, не предъявленные const_ref во входе, вне среза.

## lawref.amend_enum.AUTO_REGRESSION_CAP

*attribute* · *module attribute*

```python
AUTO_REGRESSION_CAP = 64
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/amend_enum.py#L14-L14)

## lawref.amend_enum.enum_members

*function*

```python
def enum_members(document: dict) -> dict[str, list[dict]]
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/amend_enum.py#L17-L23)

## lawref.amend_enum.exclude

*function*

```python
def exclude(rule: dict, edits: list[dict]) -> dict
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/amend_enum.py#L34-L40)

## lawref.amend_enum.prepare

*function*

```python
def prepare(document: dict, targets: list[tuple[str, dict]], observations: list[tuple[str, dict]], reserved: set[str]) -> tuple[list[dict], dict]
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/amend_enum.py#L75-L136)

## lawref.amend_enum.replace_value

*function*

```python
def replace_value(node, old: dict, new: dict)
```

Заменить все вхождения терма и обновить только затронутые хэши.

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/amend_enum.py#L43-L57)

## lawref.amend_enum.scenario_key

*function*

```python
def scenario_key(scenario: dict) -> bytes
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/amend_enum.py#L60-L72)

## lawref.amend_enum.valid_edit

*function*

```python
def valid_edit(rule: dict, edit: dict, enums: dict[str, list[dict]]) -> bool
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/amend_enum.py#L26-L31)
