`_find_raises` only matched `Raises` markers that appear directly in an
`Annotated` metadata slot. A marker shared through a PEP 695 `type` alias
(`type Common = Raises[...]`) sits there as a `TypeAliasType`, so
`isinstance(meta, Raises)` failed and the marker was dropped silently.
Add a shared `_unwrap_type_alias` helper and apply it to each metadata
element before the checks (and reuse it at the annotation top and in
`_annotated_base`). Aliasing the whole annotation already worked; this
makes the aliased-marker-in-metadata spelling work on par with tuple
unpacking.
Also: docs (decorator guide gains a spellings/sharing/composition section
and the new spelling; bilingual CHANGELOG page wired into mkdocs nav),
bump to 1.0.1.
Проблема
_find_raises находил Raises-маркеры только когда они стоят напрямую в слоте метаданных Annotated. Маркер, переиспользуемый через PEP 695 type-алиас (type Common = Raises[...]), лежит там как TypeAliasType, поэтому isinstance(meta, Raises) не срабатывал и маркер терялся молча:
Алиас, оборачивающий всю аннотацию (type X = Annotated[Item, Raises[...]]), работал и раньше.
Изменение
Проверка