Skip to content

Commit 18569a1

Browse files
committed
changed Enum with IntEnum
1 parent 693db91 commit 18569a1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

nlightreader/consts/enums.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import logging
2-
from enum import Enum, unique
2+
from enum import IntEnum, unique
33

44
LIB_LISTS = (
55
"planned",
@@ -13,7 +13,7 @@
1313

1414
class Nl:
1515
@unique
16-
class Language(Enum):
16+
class Language(IntEnum):
1717
undefined = 0
1818
en = 1
1919
ru = 2
@@ -46,14 +46,14 @@ def to_str(self) -> str:
4646
return names[self.value]
4747

4848
@unique
49-
class CatalogType(Enum):
49+
class CatalogType(IntEnum):
5050
manga = 0
5151
hentai_manga = 1
5252
ranobe = 2
5353
anime = 3
5454

5555
@unique
56-
class MangaKind(Enum):
56+
class MangaKind(IntEnum):
5757
undefined = 0
5858
manga = 1
5959
manhwa = 2
@@ -102,7 +102,7 @@ def to_str(self) -> str:
102102
return names[self.value]
103103

104104
@unique
105-
class LibList(Enum):
105+
class LibList(IntEnum):
106106
planned = 0
107107
completed = 1
108108
reading = 2
@@ -131,7 +131,7 @@ def to_str(self) -> str:
131131
return LIB_LISTS[self.value]
132132

133133
@unique
134-
class MangaStatus(Enum):
134+
class MangaStatus(IntEnum):
135135
undefined = 0
136136
ongoing = 1
137137
released = 2

0 commit comments

Comments
 (0)