Skip to content

Commit

Permalink
chore: Add typehints in load_aspace_shelf
Browse files Browse the repository at this point in the history
  • Loading branch information
AiyionPrime authored and oroulet committed Feb 21, 2024
1 parent c7d4354 commit 49ab1c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions asyncua/server/address_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ def make_aspace_shelf(self, path: Path):
for nodeid, ndata in self._nodes.items():
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.
The dump() method can no longer be used if the address space is being loaded from a shelf
Expand All @@ -728,8 +728,8 @@ class LazyLoadingDict(collections.abc.MutableMapping):
is currently NOT supported
"""

def __init__(self, source):
self.source = source # python shelf
def __init__(self, source: shelve.Shelf):
self.source: shelve.Shelf = source # python shelf
self.cache = {} # internal dict

def __getitem__(self, key):
Expand Down

0 comments on commit 49ab1c9

Please sign in to comment.