diff --git a/src/correctionlib/schemav2.py b/src/correctionlib/schemav2.py index 2073359..783ee84 100644 --- a/src/correctionlib/schemav2.py +++ b/src/correctionlib/schemav2.py @@ -70,13 +70,18 @@ def __rich__(self) -> str: # py3.7+: ForwardRef can be used instead of strings Content = Union[ - "Binning", - "MultiBinning", - "Category", - "Formula", - "FormulaRef", - "Transform", - "HashPRNG", + Annotated[ + Union[ + "Binning", + "MultiBinning", + "Category", + "Formula", + "FormulaRef", + "Transform", + "HashPRNG", + ], + Field(discriminator="nodetype"), + ], float, ]