mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
add lookup method to fool type checker
This commit is contained in:
@ -5,4 +5,10 @@ class HashMap:
|
||||
self.max_entries = max_entries
|
||||
self.entries = {}
|
||||
|
||||
def lookup(self, key):
|
||||
if key in self.entries:
|
||||
return self.entries[key]
|
||||
else:
|
||||
return None
|
||||
|
||||
# add other supported map functions here
|
||||
|
||||
Reference in New Issue
Block a user