From 24db0692c62845cbe83655eabf67f1b603327df0 Mon Sep 17 00:00:00 2001 From: Avasam Date: Mon, 27 Mar 2023 14:47:55 -0400 Subject: [PATCH] Add more default values to python-xlib (#9960) --- stubs/python-xlib/Xlib/protocol/rq.pyi | 2 +- stubs/python-xlib/Xlib/xauth.pyi | 2 +- stubs/python-xlib/Xlib/xobject/drawable.pyi | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stubs/python-xlib/Xlib/protocol/rq.pyi b/stubs/python-xlib/Xlib/protocol/rq.pyi index e3eca88ab..006e87872 100644 --- a/stubs/python-xlib/Xlib/protocol/rq.pyi +++ b/stubs/python-xlib/Xlib/protocol/rq.pyi @@ -107,7 +107,7 @@ class Resource(Card32): cast_function: str class_name: str codes: tuple[int, ...] - def __init__(self, name: str, codes: tuple[int, ...] = ..., default: int | None = None) -> None: ... + def __init__(self, name: str, codes: tuple[int, ...] = (), default: int | None = None) -> None: ... @overload # type: ignore[override] def check_value(self, value: Callable[[], _T]) -> _T: ... @overload diff --git a/stubs/python-xlib/Xlib/xauth.pyi b/stubs/python-xlib/Xlib/xauth.pyi index 58d81d09c..2199dd412 100644 --- a/stubs/python-xlib/Xlib/xauth.pyi +++ b/stubs/python-xlib/Xlib/xauth.pyi @@ -17,5 +17,5 @@ class Xauthority: def __len__(self) -> int: ... def __getitem__(self, i: int) -> tuple[bytes, bytes, bytes, bytes, bytes]: ... def get_best_auth( - self, family: bytes, address: bytes, dispno: bytes, types: tuple[bytes, ...] = ... + self, family: bytes, address: bytes, dispno: bytes, types: tuple[bytes, ...] = (b"MIT-MAGIC-COOKIE-1",) ) -> tuple[bytes, bytes]: ... diff --git a/stubs/python-xlib/Xlib/xobject/drawable.pyi b/stubs/python-xlib/Xlib/xobject/drawable.pyi index c337a45ca..c6d6a1887 100644 --- a/stubs/python-xlib/Xlib/xobject/drawable.pyi +++ b/stubs/python-xlib/Xlib/xobject/drawable.pyi @@ -239,19 +239,19 @@ class Window(Drawable): def set_wm_client_machine(self, name: bytes | str, onerror: ErrorHandler[object] | None = None) -> None: ... def get_wm_client_machine(self) -> str | None: ... def set_wm_normal_hints( - self, hints: rq.DictWrapper | dict[str, Any] = ..., onerror: ErrorHandler[object] | None = None, **keys: object + self, hints: rq.DictWrapper | dict[str, Any] = {}, onerror: ErrorHandler[object] | None = None, **keys: object ) -> None: ... def get_wm_normal_hints(self) -> rq.DictWrapper | None: ... def set_wm_hints( - self, hints: rq.DictWrapper | dict[str, Any] = ..., onerror: ErrorHandler[object] | None = None, **keys: object + self, hints: rq.DictWrapper | dict[str, Any] = {}, onerror: ErrorHandler[object] | None = None, **keys: object ) -> None: ... def get_wm_hints(self) -> rq.DictWrapper | None: ... def set_wm_state( - self, hints: rq.DictWrapper | dict[str, Any] = ..., onerror: ErrorHandler[object] | None = None, **keys: object + self, hints: rq.DictWrapper | dict[str, Any] = {}, onerror: ErrorHandler[object] | None = None, **keys: object ) -> None: ... def get_wm_state(self) -> rq.DictWrapper | None: ... def set_wm_icon_size( - self, hints: rq.DictWrapper | dict[str, Any] = ..., onerror: ErrorHandler[object] | None = None, **keys: object + self, hints: rq.DictWrapper | dict[str, Any] = {}, onerror: ErrorHandler[object] | None = None, **keys: object ) -> None: ... def get_wm_icon_size(self) -> rq.DictWrapper | None: ...