Commit 49ab1c9b authored by Jan-Niklas Burfeind's avatar Jan-Niklas Burfeind Committed by oroulet

chore: Add typehints in load_aspace_shelf

parent c7d4354a
...@@ -711,7 +711,7 @@ class AddressSpace: ...@@ -711,7 +711,7 @@ class AddressSpace:
for nodeid, ndata in self._nodes.items(): for nodeid, ndata in self._nodes.items():
s[nodeid.to_string()] = ndata s[nodeid.to_string()] = ndata
def load_aspace_shelf(self, path): def load_aspace_shelf(self, path: Path):
""" """
Load the standard address space nodes from a python shelve via LazyLoadingDict as needed. Load the standard address space nodes from a python shelve via LazyLoadingDict as needed.
The dump() method can no longer be used if the address space is being loaded from a shelf The dump() method can no longer be used if the address space is being loaded from a shelf
...@@ -728,8 +728,8 @@ class AddressSpace: ...@@ -728,8 +728,8 @@ class AddressSpace:
is currently NOT supported is currently NOT supported
""" """
def __init__(self, source): def __init__(self, source: shelve.Shelf):
self.source = source # python shelf self.source: shelve.Shelf = source # python shelf
self.cache = {} # internal dict self.cache = {} # internal dict
def __getitem__(self, key): def __getitem__(self, key):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment