Skip to content

Commit

Permalink
Merge pull request #2127 from sopel-irc/tools.events-enum
Browse files Browse the repository at this point in the history
tools.events: convert to `Enum`
  • Loading branch information
dgw authored Jul 5, 2021
2 parents d2014f9 + bc43438 commit 31ccf77
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sopel/tools/_events.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from __future__ import generator_stop

from enum import Enum

class events(object):

class events(str, Enum):
"""An enumeration of all the standardized and notable IRC numeric events
This allows you to do, for example, ``@plugin.event(events.RPL_WELCOME)``
Expand Down Expand Up @@ -79,7 +81,7 @@ class events(object):
ERR_NOTREGISTERED = '451'
ERR_NEEDMOREPARAMS = '461'
ERR_ALREADYREGISTRED = '462'
ERR_ALREADYREGISTERED = '462' # corrected spelling used in some tutorials
ERR_ALREADYREGISTERED = ERR_ALREADYREGISTRED # corrected spelling used in some tutorials
ERR_NOPERMFORHOST = '463'
ERR_PASSWDMISMATCH = '464'
ERR_YOUREBANNEDCREEP = '465'
Expand Down

0 comments on commit 31ccf77

Please sign in to comment.