We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
key.py
key
__init__
1 parent 6ae17c2 commit 38ec8f4Copy full SHA for 38ec8f4
readchar/key.py
@@ -1,13 +1,11 @@
1
# flake8: noqa E401,E403
2
# this file exists only for backwards compatibility
3
# it allows the use of `import readchar.key`
4
+import sys
5
-from . import platform
6
+from . import key as __key
7
8
-if platform.startswith(("linux", "darwin", "freebsd")):
9
- from ._posix_key import *
10
-elif platform in ("win32", "cygwin"):
11
- from ._win_key import *
12
-else:
13
- raise NotImplementedError(f"The platform {platform} is not supported yet")
+for __k, __v in vars(__key).items():
+ if not __k.startswith("__"):
+ setattr(sys.modules[__name__], __k, __v)
0 commit comments