From d6ba30805e548a7ae9dce773dedbc09910bf02cd Mon Sep 17 00:00:00 2001 From: varun-r-mallya Date: Tue, 9 Sep 2025 00:10:02 +0530 Subject: [PATCH] add lookup method to fool type checker --- pythonbpf/maps.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pythonbpf/maps.py b/pythonbpf/maps.py index 585d9c8..9926826 100644 --- a/pythonbpf/maps.py +++ b/pythonbpf/maps.py @@ -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