variable typing

This commit is contained in:
John Lancaster
2026-02-21 19:47:17 -06:00
parent 32ee15348b
commit 428db7366e
2 changed files with 2 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ class HookedMapping(HookedContainer[T], MutableMapping[T, MutableNesting[T]]):
case MutableMapping() as mapping:
new_path = copy(self._path)
new_path.append(key)
return HookedMapping(self.hook, existing=mapping, path=new_path)
return type(self)(self.hook, existing=mapping, path=new_path)
case MutableSequence() as seq:
new_path = copy(self._path)
new_path.append(key)