Skip to content

Commit 9f9eea7

Browse files
committed
Remove enums from masterkeys
The Enum in Python is still an incompatible mess of a thing with enum34 and enum (stdlib) having the same import and being imcompatible and not even always installable. So, still no enums.
1 parent 35aa447 commit 9f9eea7

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

masterkeys/__init__.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
except ImportError:
99
import warnings
1010
warnings.warn("Failed to import masterkeys C library", ImportWarning)
11-
from enum import Enum
1211
try:
1312
from typing import Dict, List, Tuple
1413
except ImportError: # PyCharm typing
@@ -19,8 +18,7 @@
1918
MAX_COLS = 24
2019

2120

22-
class ResultCode(Enum):
23-
21+
class ResultCode:
2422
# Success codes
2523
SUCCESS = 0
2624

@@ -50,8 +48,7 @@ class ResultCode(Enum):
5048
ERR_PROTOCOL = -13
5149

5250

53-
class Effect(Enum):
54-
# Effects
51+
class Effect:
5552
EFF_FULL_ON = 0
5653
EFF_BREATH = 1
5754
EFF_BREATH_CYCLE = 2
@@ -67,8 +64,7 @@ class Effect(Enum):
6764
EFF_RAPID_FIRE = 12
6865

6966

70-
class Model(Enum):
71-
# Models
67+
class Model:
7268
MODEL_RGB_L = 0
7369
MODEL_RGB_M = 5
7470
MODEL_RGB_S = 1

0 commit comments

Comments
 (0)