this is strange : my class is recognized as an Enum even tho i didn't inherite from it
class AccessId:
MENU_TAB: str = "Menu"
BASKET_TAB: str = "Panier"
BUYLIST_TAB: str = "Listes"
HOME_TAB: str = "Accueil"
DISCOUNT_TAB: str = "Promos"
DELETE_PRODUCT: str = "Supprimer l'article"
I tried to debug with this assertion :
assert type(AccessId.HOME_TAB) is str
And got :
AssertionError: assert <enum 'AccessId'> is str
+ where <enum 'AccessId'> = type(<AccessId.HOME_TAB: 'Accueil'>)
I do not understand, please, someone, help me
Things i tried :
__pycache__
foldersassert type(AccessId.HOME_TAB.value) is str
since it's apparently an enum and it didn't find the attribute value.type(AccessId.HOME_TAB) is str
and got True
wtfI found why, please check if your IDE doesn't auto-import from the wrong directory. In my case, it was the build directory where i previously subclass Enum with AccessId.