We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ListModel.append does not check type
## 🐛 Bug
in working on layer groups, I found a strange lack of type checking when appending to a `ListModel` (which inherits from `TypedList`).  [`ListModel.append`](https://github.com/napari/napari/blob/59ed366e9d492a2389c451468fd8b9f96508b4e2/napari/utils/list/_model.py#L59)  jumps right over `TypedList.append`
https://github.com/napari/napari/blob/59ed366e9d492a2389c451468fd8b9f96508b4e2/napari/utils/list/_model.py#L58-L60

... and if you try to something that is not a `Layer` to a `LayerList`, it works fine up until throwing an error (unrelated to typing) in `components.layerlist._add`.  Is that supposed to be `TypedList.append(self, obj)`?  or was that intentional?

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `napari/utils/list/_model.py`
Content:
```
1 from ...utils.event import EmitterGroup
2 
3 from ._multi import MultiIndexList
4 from ._typed import TypedList
5 
6 
7 class ListModel(MultiIndexList, TypedList):
8     """List with events, tuple-indexing, typing, and filtering.
9 
10     Parameters
11     ----------
12     basetype : type
13         Type of the elements in the list.
14     iterable : iterable, optional
15         Elements to initialize the list with.
16     lookup : dict of type : function(object, ``basetype``) -> bool
17         Functions that determine if an object is a reference to an
18         element of the list.
19 
20     Attributes
21     ----------
22     events : vispy.util.event.EmitterGroup
23         Group of events for adding, removing, and reordering elements
24         within the list.
25     """
26 
27     def __init__(self, basetype, iterable=(), lookup=None):
28         super().__init__(basetype, iterable, lookup)
29         self.events = EmitterGroup(
30             source=self,
31             auto_connect=True,
32             added=None,
33             removed=None,
34             reordered=None,
35             changed=None,
36         )
37         self.events.added.connect(self.events.changed)
38         self.events.removed.connect(self.events.changed)
39         self.events.reordered.connect(self.events.changed)
40 
41     def __setitem__(self, query, values):
42         indices = tuple(self.__prsitem__(query))
43         new_indices = tuple(values)
44 
45         if sorted(indices) != sorted(self.index(v) for v in new_indices):
46             raise TypeError(
47                 'must be a reordering of indices; '
48                 'setting of list items not allowed'
49             )
50 
51         super().__setitem__(indices, new_indices)
52         self.events.reordered()
53 
54     def insert(self, index, obj):
55         super().insert(index, obj)
56         self.events.added(item=obj, index=self.__locitem__(index))
57 
58     def append(self, obj):
59         super(TypedList, self).append(obj)
60         self.events.added(item=obj, index=len(self) - 1)
61 
62     def pop(self, key):
63         obj = super().pop(key)
64         self.events.removed(item=obj, index=key)
65         return obj
66
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/napari/utils/list/_model.py b/napari/utils/list/_model.py
--- a/napari/utils/list/_model.py
+++ b/napari/utils/list/_model.py
@@ -56,7 +56,7 @@
         self.events.added(item=obj, index=self.__locitem__(index))
 
     def append(self, obj):
-        super(TypedList, self).append(obj)
+        TypedList.append(self, obj)
         self.events.added(item=obj, index=len(self) - 1)
 
     def pop(self, key):

{"golden_diff": "diff --git a/napari/utils/list/_model.py b/napari/utils/list/_model.py\n--- a/napari/utils/list/_model.py\n+++ b/napari/utils/list/_model.py\n@@ -56,7 +56,7 @@\n         self.events.added(item=obj, index=self.__locitem__(index))\n \n     def append(self, obj):\n-        super(TypedList, self).append(obj)\n+        TypedList.append(self, obj)\n         self.events.added(item=obj, index=len(self) - 1)\n \n     def pop(self, key):\n", "issue": "ListModel.append does not check type\n## \ud83d\udc1b Bug\r\nin working on layer groups, I found a strange lack of type checking when appending to a `ListModel` (which inherits from `TypedList`).  [`ListModel.append`](https://github.com/napari/napari/blob/59ed366e9d492a2389c451468fd8b9f96508b4e2/napari/utils/list/_model.py#L59)  jumps right over `TypedList.append`\r\nhttps://github.com/napari/napari/blob/59ed366e9d492a2389c451468fd8b9f96508b4e2/napari/utils/list/_model.py#L58-L60\r\n\r\n... and if you try to something that is not a `Layer` to a `LayerList`, it works fine up until throwing an error (unrelated to typing) in `components.layerlist._add`.  Is that supposed to be `TypedList.append(self, obj)`?  or was that intentional?\n", "before_files": [{"content": "from ...utils.event import EmitterGroup\n\nfrom ._multi import MultiIndexList\nfrom ._typed import TypedList\n\n\nclass ListModel(MultiIndexList, TypedList):\n    \"\"\"List with events, tuple-indexing, typing, and filtering.\n\n    Parameters\n    ----------\n    basetype : type\n        Type of the elements in the list.\n    iterable : iterable, optional\n        Elements to initialize the list with.\n    lookup : dict of type : function(object, ``basetype``) -> bool\n        Functions that determine if an object is a reference to an\n        element of the list.\n\n    Attributes\n    ----------\n    events : vispy.util.event.EmitterGroup\n        Group of events for adding, removing, and reordering elements\n        within the list.\n    \"\"\"\n\n    def __init__(self, basetype, iterable=(), lookup=None):\n        super().__init__(basetype, iterable, lookup)\n        self.events = EmitterGroup(\n            source=self,\n            auto_connect=True,\n            added=None,\n            removed=None,\n            reordered=None,\n            changed=None,\n        )\n        self.events.added.connect(self.events.changed)\n        self.events.removed.connect(self.events.changed)\n        self.events.reordered.connect(self.events.changed)\n\n    def __setitem__(self, query, values):\n        indices = tuple(self.__prsitem__(query))\n        new_indices = tuple(values)\n\n        if sorted(indices) != sorted(self.index(v) for v in new_indices):\n            raise TypeError(\n                'must be a reordering of indices; '\n                'setting of list items not allowed'\n            )\n\n        super().__setitem__(indices, new_indices)\n        self.events.reordered()\n\n    def insert(self, index, obj):\n        super().insert(index, obj)\n        self.events.added(item=obj, index=self.__locitem__(index))\n\n    def append(self, obj):\n        super(TypedList, self).append(obj)\n        self.events.added(item=obj, index=len(self) - 1)\n\n    def pop(self, key):\n        obj = super().pop(key)\n        self.events.removed(item=obj, index=key)\n        return obj\n", "path": "napari/utils/list/_model.py"}], "after_files": [{"content": "from ...utils.event import EmitterGroup\n\nfrom ._multi import MultiIndexList\nfrom ._typed import TypedList\n\n\nclass ListModel(MultiIndexList, TypedList):\n    \"\"\"List with events, tuple-indexing, typing, and filtering.\n\n    Parameters\n    ----------\n    basetype : type\n        Type of the elements in the list.\n    iterable : iterable, optional\n        Elements to initialize the list with.\n    lookup : dict of type : function(object, ``basetype``) -> bool\n        Functions that determine if an object is a reference to an\n        element of the list.\n\n    Attributes\n    ----------\n    events : vispy.util.event.EmitterGroup\n        Group of events for adding, removing, and reordering elements\n        within the list.\n    \"\"\"\n\n    def __init__(self, basetype, iterable=(), lookup=None):\n        super().__init__(basetype, iterable, lookup)\n        self.events = EmitterGroup(\n            source=self,\n            auto_connect=True,\n            added=None,\n            removed=None,\n            reordered=None,\n            changed=None,\n        )\n        self.events.added.connect(self.events.changed)\n        self.events.removed.connect(self.events.changed)\n        self.events.reordered.connect(self.events.changed)\n\n    def __setitem__(self, query, values):\n        indices = tuple(self.__prsitem__(query))\n        new_indices = tuple(values)\n\n        if sorted(indices) != sorted(self.index(v) for v in new_indices):\n            raise TypeError(\n                'must be a reordering of indices; '\n                'setting of list items not allowed'\n            )\n\n        super().__setitem__(indices, new_indices)\n        self.events.reordered()\n\n    def insert(self, index, obj):\n        super().insert(index, obj)\n        self.events.added(item=obj, index=self.__locitem__(index))\n\n    def append(self, obj):\n        TypedList.append(self, obj)\n        self.events.added(item=obj, index=len(self) - 1)\n\n    def pop(self, key):\n        obj = super().pop(key)\n        self.events.removed(item=obj, index=key)\n        return obj\n", "path": "napari/utils/list/_model.py"}]}