1313from .base import Base
1414from .constant import Constant
1515from .enum import Enum
16- from .normative import NormativePoint
1716from .primitive import NumericType
17+ from .requirement import RequirementTag
1818from .scalar import ScalarType
1919from .struct import Struct
2020from .union import Union
2424class Package (Base ):
2525 _PT_ALLOW_DEFAULTS : list [type [Base ]] = [Constant ]
2626 _PT_FIELDS : dict
27- _PT_NORMS : dict
27+ _PT_REQUIREMENTS : dict
2828
2929 @classmethod
3030 def _pt_construct (cls , parent : Base ) -> None :
3131 super ()._pt_construct (parent )
3232 cls ._PT_FIELDS = {}
33- cls ._PT_NORMS = {}
33+ cls ._PT_REQUIREMENTS = {}
3434 for fname , ftype , fval in cls ._pt_definitions ():
3535 if inspect .isclass (ftype ) and issubclass (ftype , Constant ):
3636 cls ._pt_attach_constant (fname , ftype (default = fval ))
@@ -45,9 +45,9 @@ def _pt_attach_constant(cls, fname: str, finst: Constant) -> Constant:
4545 return finst
4646
4747 @classmethod
48- def _pt_attach_norm (cls , fname : str , finst : NormativePoint ) -> NormativePoint :
48+ def _pt_attach_norm (cls , fname : str , finst : RequirementTag ) -> RequirementTag :
4949 finst ._PT_ATTACHED_TO = cls
50- cls ._PT_NORMS [fname ] = finst
50+ cls ._PT_REQUIREMENTS [fname ] = finst
5151 cls ._PT_FIELDS [finst ] = finst
5252 setattr (cls , fname , finst )
5353 return finst
@@ -170,8 +170,11 @@ def _pt_unions(self) -> Iterable[tuple[str, Union]]:
170170 return self ._pt_filter_for_class (Union )
171171
172172 @property
173- def _pt_norms (self ) -> Iterable [tuple [str , NormativePoint ]]:
174- return ((vnorm_name , vnorm_inst ) for vnorm_name , vnorm_inst in self ._PT_NORMS .items ())
173+ def _pt_reqs (self ) -> Iterable [tuple [str , RequirementTag ]]:
174+ return (
175+ (requirement_name , requirement_inst )
176+ for requirement_name , requirement_inst in self ._PT_REQUIREMENTS .items ()
177+ )
175178
176179 @property
177180 def _pt_structs_and_unions (self ) -> Iterable [tuple [str , Struct | Union ]]:
0 commit comments