Bad code snippet:
This comment is currently being flagged against the enum-string guideline, but that guideline is out of date for polymorphic base classes. The base class should keep the discriminator as a plain string type; only derived child models should use explicit extensible enum typing for the discriminator.
Good code snippet:
Please update the Python model guideline to clarify that polymorphic base classes use str for the discriminator, while child classes may use Union[str, <ExtensibleEnum>] where appropriate.
Bad code snippet:
This comment is currently being flagged against the enum-string guideline, but that guideline is out of date for polymorphic base classes. The base class should keep the discriminator as a plain string type; only derived child models should use explicit extensible enum typing for the discriminator.
Good code snippet:
Please update the Python model guideline to clarify that polymorphic base classes use
strfor the discriminator, while child classes may useUnion[str, <ExtensibleEnum>]where appropriate.