v0.4.3
Fixed
dx.TaggedUnionvariant discriminator now accepts every spelling ofLiteral[...]: bareLiteral["x"], qualifiedtyping.Literal["x"], and aliased imports (from typing import Literal as L). Underfrom __future__ import annotationsthe discriminator annotation arrives as a string; the variant check now evaluates that string in the class's defining module before applying theget_origin(...) is Literalcheck, instead of pattern-matching on the source text. Useful when the variant Model has a class also namedLiteral(e.g. an AST module exportingLiteral,Variable,BinaryOpfrom a discriminator-taggedASTNodeunion root) so the user can keep the public API name. (#18)
Full changelog: https://github.com/panproto/didactic/blob/main/CHANGELOG.md