-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenums.py
86 lines (80 loc) · 1.52 KB
/
enums.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import enum
class Genre(enum.Enum):
Alternative = 'Alternative'
Blues = 'Blues'
Classical = 'Classical'
Country = 'Country'
Electronic = 'Electronic'
Folk = 'Folk'
Funk = 'Funk'
Hip_Hop = 'Hip-Hop'
Heavy_Metal = 'Heavy Metal'
Instrumental = 'Instrumental'
Jazz = 'Jazz'
Musical_Theatre = 'Musical Theatre'
Pop = 'Pop'
Punk = 'Punk'
R_B = 'R&B'
Reggae = 'Reggae'
Rock_n_Roll = 'Rock n Roll'
Soul = 'Soul'
Other = 'Other'
@classmethod
def choices(cls):
""" Methods decorated with @classmethod can be called statically without having an instance of the class."""
return [(choice.name, choice.value) for choice in cls]
class State(enum.Enum):
AL = 'AL'
AK = 'AK'
AZ = 'AZ'
AR = 'AR'
CA = 'CA'
CO = 'CO'
CT = 'CT'
DE = 'DE'
DC = 'DC'
FL = 'FL'
GA = 'GA'
HI = 'HI'
ID = 'ID'
IL = 'IL'
IN = 'IN'
IA = 'IA'
KS = 'KS'
KY = 'KY'
LA = 'LA'
ME = 'ME'
MT = 'MT'
NE = 'NE'
NV = 'NV'
NH = 'NH'
NJ = 'NJ'
NM = 'NM'
NY = 'NY'
NC = 'NC'
ND = 'ND'
OH = 'OH'
OK = 'OK'
OR = 'OR'
MD = 'MD'
MA = 'MA'
MI = 'MI'
MN = 'MN'
MS = 'MS'
MO = 'MO'
PA = 'PA'
RI = 'RI'
SC = 'SC'
SD = 'SD'
TN = 'TN'
TX = 'TX'
UT = 'UT'
VT = 'VT'
VA = 'VA'
WA = 'WA'
WV = 'WV'
WI = 'WI'
WY = 'WY'
@classmethod
def choices(cls):
return [(choice.name, choice.value) for choice in cls]