Skip to content

Commit 53bd753

Browse files
committed
XK
1 parent c7a798a commit 53bd753

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Xlib/XK.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
# definition modules in the Xlib/keysymdef directory.
2525

2626
from Xlib.X import NoSymbol
27+
try:
28+
from typing import TYPE_CHECKING
29+
except ImportError:
30+
TYPE_CHECKING = False
2731

2832
def string_to_keysym(keysym):
2933
# type: (str) -> int
@@ -66,7 +70,11 @@ def _load_keysyms_into_XK(mod):
6670

6771
# Always import miscellany and latin1 keysyms
6872
load_keysym_group('miscellany')
73+
if TYPE_CHECKING:
74+
from Xlib.keysymdef.miscellany import *
6975
load_keysym_group('latin1')
76+
if TYPE_CHECKING:
77+
from Xlib.keysymdef.latin1 import *
7078

7179

7280
def keysym_to_string(keysym):

0 commit comments

Comments
 (0)