diff --git a/stubs/pynput/@tests/stubtest_allowlist.txt b/stubs/pynput/@tests/stubtest_allowlist.txt index 410c9faa2eb5..b7f3db650225 100644 --- a/stubs/pynput/@tests/stubtest_allowlist.txt +++ b/stubs/pynput/@tests/stubtest_allowlist.txt @@ -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__ diff --git a/stubs/pynput/pynput/keyboard/_base.pyi b/stubs/pynput/pynput/keyboard/_base.pyi index 6c10ba3ceb33..d930c6654b29 100644 --- a/stubs/pynput/pynput/keyboard/_base.pyi +++ b/stubs/pynput/pynput/keyboard/_base.pyi @@ -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): ...