From 952d1faccea039283c6356a6d9caec20279c18ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 19 Mar 2025 15:24:23 +0100 Subject: [PATCH] vm-manager: ignore interface between GObject and ListModel --- pkgs/clan-vm-manager/clan_vm_manager/components/gkvstore.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/clan-vm-manager/clan_vm_manager/components/gkvstore.py b/pkgs/clan-vm-manager/clan_vm_manager/components/gkvstore.py index 33fa9a617..2d47820d6 100644 --- a/pkgs/clan-vm-manager/clan_vm_manager/components/gkvstore.py +++ b/pkgs/clan-vm-manager/clan_vm_manager/components/gkvstore.py @@ -18,7 +18,11 @@ V = TypeVar( ) # Value type, bound to GObject.GObject or its subclasses -class GKVStore(GObject.GObject, Gio.ListModel, Generic[K, V]): +# GObject and Gio.ListModel are not compatible with mypy, so we need to ignore the errors +# clan_vm_manager/components/gkvstore.py:21: error: Definition of "newv" in base class "Object" is incompatible with definition in base class "GInterface" [misc] +# clan_vm_manager/components/gkvstore.py:21: error: Definition of "install_properties" in base class "Object" is incompatible with definition in base class "GInterface" [misc] +# clan_vm_manager/components/gkvstore.py:21: error: Definition of "getv" in base class "Object" is incompatible with definition in base class "GInterface" [misc] +class GKVStore(GObject.GObject, Gio.ListModel, Generic[K, V]): # type: ignore[misc] """ A simple key-value store that implements the Gio.ListModel interface, with generic types for keys and values. Only use self[key] and del self[key] for accessing the items for better performance.