How to use the aenum.unique function in aenum

To help you get started, we’ve selected a few aenum examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BigBrotherBot / big-brother-bot / b3-2 / events.py View on Github external
import aenum
import configparser
import queue
import threading
import time
import traceback
import typing

from .clients import Client
from .output import LoggerMixin
from .plugin import Plugin


@aenum.unique
class EventType(aenum.Enum):
    """B3 parser indipendent event type definitions"""
    EXIT = 'Program exit'
    CLIENT_AUTH = 'Client authentication'
    CLIENT_BAN = 'Client ban'
    CLIENT_CONNECT = 'Client connect'
    CLIENT_DISCONNECT = 'Client disconnect'
    CLIENT_DAMAGE = 'Client damage'
    CLIENT_DAMAGE_TEAM = 'Client team damage'
    CLIENT_DAMAGE_SELF = 'Client self damage'
    CLIENT_KICK = 'Client kick'
    CLIENT_KILL = 'Client kill'
    CLIENT_KILL_TEAM = 'Client team kill'
    CLIENT_KILL_SELF = 'Client suicide'
    CLIENT_NAME_CHANGE = 'Client name change'
    CLIENT_NOTICE = 'Client notice'

aenum

Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants

BSD-2-Clause
Latest version published 10 months ago

Package Health Score

78 / 100
Full package analysis