Breaking changes
-
Tagifiable.tagify()'s return annotation is nowTagified, a new type alias for the union of fully-tagified shapes (TagifiedNode | float | None | Sequence[Tagified], mirroringTagChild). Custom.tagify()implementations annotated with bareTagList/Tagreturn types should switch to-> Tagified, or drop the annotation. Runtime behavior of correct implementations is unchanged. (#105, #116) -
The result of
.tagify()is now immutable. Calling.append,.extend,.insert,.add_class,__setitem__, or the context-managerwithform on a tagified value raisesAttributeErrorand is a static type error. Mutate on the buildableTag/TagListside, then call.tagify()once to produce the render-ready result. (#116) -
TagList.tagify()now raisesTypeErrorat the boundary when a child's.tagify()returns un-tagified content (e.g. a bareTagListcontaining a still-Tagifiableobject). The error names the offending class and slot index so buggy.tagify()implementations surface at the source. The render-timeRuntimeErrorfor the same family of violations has been clarified. (#7, #105, #112, #116)
New features
-
Exported the new tagified sibling classes
TagifiedTagandTagifiedTagList. Use them in narrow annotations (def f(t: TagifiedTag): ...) andisinstancechecks on.tagify()output. (#116) -
Added
is_tagified(x)for runtime distinguishability between buildableTag/TagListand their tagified counterparts. Returns aTypeIs[...]so pyright narrows at call sites. (#116)
Dependencies
- Bumped
typing-extensionsfloor to>=4.12.0.
Other changes
-
Switched the contributor workflow to
uvand reorganizedMakefiletargets. Runmake setup(ormake ai-setup) to bootstrap a dev environment, andmake helpto list available targets.pip install -e ".[dev,test]"no longer works sincedevandtestare now PEP 735 dependency groups; useuv sync --all-groupsinstead. (#107) -
Replaced
black,isort, andflake8withrufffor linting and formatting. Runmake formatto auto-fix, ormake check-formatto verify. (#110)