{"body":"class FrozenEnum(EnumMeta):\n    \"prevent creation of new attributes\"\n    def __getattr__(self, name):\n        if name not in self._member_map_:\n            raise AttributeError('%s %r has no attribute %r'\n                % (self.__class__.__name__, self.__name__, name))\n        # mypy does not know this is a metaclass and that __getattr__ is\n        # defined in the superclass of the class that uses this\n        # so we need to ignore the type error here.\n        return super().__getattr__(name)  # type: ignore\n\n    def __setattr__(self, name, value):\n        if name in self.__dict__ or name in self._member_map_:\n            return super().__setattr__(name, value)\n        raise AttributeError('%s %r has no attribute %r'\n                % (self.__class__.__name__, self.__name__, name))\n\n\nclass IronicEnum(StrEnum, metaclass=FrozenEnum):\n    @classmethod\n    def list(cls):\n        return list(cls.__members__)\n","name":"","extension":"txt","url":"https://www.irccloud.com/pastebin/LDlP3VmS","modified":1725397587,"id":"LDlP3VmS","size":920,"lines":22,"own_paste":false,"theme":"","date":1725397587}