You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The base Enum type has interesting behaviour when it comes to equality.
Depending on how they were imported,
you may well encounter a situation where a variable containing an Enum
variant does not equal the Enum variant itself,
not with `==` nor with `is`.
This is very counter-intuitive and even broke HFS authentication in
tests.
Luckily, all our Enum types are string-backed already,
so we can switch them to inherit from StrEnum.
This means they for all intents and purposes behave like regular
strings,
and equality checks on them check equality of their `.value` strings.
Import path no longer matters and ObeliskKind.HFS will always equal
ObeliskKind.HFS, no matter the context.
0 commit comments