Skip to content

Commit 9926fb7

Browse files
committed
Fix Enum eq comparison
1 parent 53b37b4 commit 9926fb7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

kalamine/generators/klc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def klc_keymap(layout: "KeyboardLayout") -> List[str]:
123123
desc = layout.dead_keys[symbol][" "]
124124
symbol = hex_ord(desc) + "@"
125125
else:
126-
if i == Layer.BASE:
126+
if i is Layer.BASE:
127127
is_alpha = symbol.upper() != symbol
128128
if symbol not in supported_symbols:
129129
symbol = hex_ord(symbol)
@@ -255,7 +255,7 @@ def c_keymap(layout: "KeyboardLayout") -> List[str]:
255255
dead = hex_ord(desc)
256256
has_dead_key = True
257257
else:
258-
if i == Layer.BASE:
258+
if i is Layer.BASE:
259259
is_alpha = symbol.upper() != symbol
260260
if symbol not in supported_symbols:
261261
symbol = hex_ord(symbol)

kalamine/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ def next(self) -> "Layer":
7171

7272
def necromance(self) -> "Layer":
7373
"""Remove the effect of the dead key if any."""
74-
if self == Layer.ODK:
74+
if self is Layer.ODK:
7575
return Layer.BASE
76-
elif self == Layer.ODK_SHIFT:
76+
elif self is Layer.ODK_SHIFT:
7777
return Layer.SHIFT
7878
return self
7979

0 commit comments

Comments
 (0)