From a7958e4ae76d074665ed29bd5ec06f85ef581ca3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com>
Date: Tue, 5 Nov 2024 09:03:33 +0100
Subject: [PATCH] FIX: mypy errors

---
 src/linkahead/common/models.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/linkahead/common/models.py b/src/linkahead/common/models.py
index e23786ed..eca43ed4 100644
--- a/src/linkahead/common/models.py
+++ b/src/linkahead/common/models.py
@@ -2522,8 +2522,8 @@ class PropertyList(list):
 
         return xml2str(xml)
 
-    def filter(self, prop: Property = None, pid: Union[str, int] = None,
-               name: str = None, check_wrapped: bool = True) -> list:
+    def filter(self, prop: Optional[Property] = None, pid: Union[None, str, int] = None,
+               name: Optional[str] = None, check_wrapped: bool = True) -> list:
         """
         Return all Properties from the given PropertyList that match the
         selection criteria.
@@ -2693,8 +2693,8 @@ class ParentList(list):
 
         return xml2str(xml)
 
-    def filter(self, parent: Parent = None, pid: Union[str, int] = None,
-               name: str = None, check_wrapped: bool = True) -> list:
+    def filter(self, parent: Optional[Parent] = None, pid: Union[None, str, int] = None,
+               name: Optional[str] = None, check_wrapped: bool = True) -> list:
         """
         Return all Parents from the given ParentList that match the selection
         criteria.
@@ -5498,14 +5498,14 @@ def delete(ids: Union[list[int], range], raise_exception_on_error: bool = True):
     return c.delete(raise_exception_on_error=raise_exception_on_error)
 
 
-def _filter_entity_list(listobject, entity: Entity = None, pid: Union[str, int] = None,
-                        name: str = None, check_wrapped: bool = True) -> list:
+def _filter_entity_list(listobject, entity: Optional[Entity] = None, pid: Union[None, str, int] = None,
+                        name: Optional[str] = None, check_wrapped: bool = True) -> list:
     """
     Return all elements from the given list that match the selection criteria.
 
     You can provide name or ID and all matching elements will be returned.
     If both name and ID are given, elements matching either criterion will be
-    returned. 
+    returned.
 
     If an Entity is given, neither name nor ID may be set. In this case, only
     elements matching both name and ID of the Entity are returned, as long as
-- 
GitLab