<p><span class="h-card" translate="no"><a href="https://aus.social/@jpm" class="u-url mention">@<span>jpm</span></a></span> this isn&#39;t an Amaranth enum; those should have a `shape=` argument in the class declaration, like:</p><p>class RunState(enum.Enum, shape=range(6)):</p><p>for Amaranth enums, == is overridden the way you need here</p><p>see <a href="https://amaranth-lang.org/docs/amaranth/latest/stdlib/enum.html#view-classes" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="ellipsis">amaranth-lang.org/docs/amarant</span><span class="invisible">h/latest/stdlib/enum.html#view-classes</span></a></p>
Reply