Skip to content

Small fixes for pynput stubs #8722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions stubs/pynput/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# TODO: go through this allowlist, figure out which of them are false positives
pynput.keyboard.Controller._Key
pynput.keyboard.Controller._KeyCode
# These __init__ methods have *args, **kwargs arguments on some platforms, but not others
pynput.keyboard.Controller.__init__
pynput.mouse.Controller.__init__
# stubtest issues with non-`type` metaclasses, see https://github.com/python/mypy/issues/13316
pynput.keyboard.Controller._Key
pynput.keyboard._base.Controller._Key
pynput.keyboard._base.Controller._KeyCode
pynput.keyboard._dummy.Controller._Key
pynput.keyboard._dummy.Controller._KeyCode
pynput.mouse.Controller.__init__
4 changes: 2 additions & 2 deletions stubs/pynput/pynput/keyboard/_base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ class Key(enum.Enum):
scroll_lock: int

class Controller:
_KeyCode: ClassVar[KeyCode] # undocumented
_Key: ClassVar[Key] # undocumented
_KeyCode: ClassVar[type[KeyCode]] # undocumented
_Key: ClassVar[type[Key]] # undocumented

class InvalidKeyException(Exception): ...
class InvalidCharacterException(Exception): ...
Expand Down