-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make
key.py
reflect key
from __init__
Fixes #107
- Loading branch information
Showing
1 changed file
with
5 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
# flake8: noqa E401,E403 | ||
# this file exists only for backwards compatibility | ||
# it allows the use of `import readchar.key` | ||
import sys | ||
|
||
from . import platform | ||
from . import key as __key | ||
|
||
|
||
if platform.startswith(("linux", "darwin", "freebsd")): | ||
from ._posix_key import * | ||
elif platform in ("win32", "cygwin"): | ||
from ._win_key import * | ||
else: | ||
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) |