From b34f7dd68a765ec640e27a810f03253350a9bfc0 Mon Sep 17 00:00:00 2001 From: varun-r-mallya Date: Mon, 13 Oct 2025 19:11:59 +0530 Subject: [PATCH] format chore --- tests/failing_tests/assign/retype.py | 1 + tests/passing_tests/assign/comprehensive.py | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/failing_tests/assign/retype.py b/tests/failing_tests/assign/retype.py index b4fc04e..0cd99fb 100644 --- a/tests/failing_tests/assign/retype.py +++ b/tests/failing_tests/assign/retype.py @@ -11,6 +11,7 @@ from pythonbpf.maps import HashMap # We can allow bitcasts in cases where the width of the types is the same in # the future. But for now, we do not allow any re-interpretation of variables. + @bpf @map def last() -> HashMap: diff --git a/tests/passing_tests/assign/comprehensive.py b/tests/passing_tests/assign/comprehensive.py index 6e53a3f..aeb6898 100644 --- a/tests/passing_tests/assign/comprehensive.py +++ b/tests/passing_tests/assign/comprehensive.py @@ -9,6 +9,7 @@ from pythonbpf.helper import ktime # the compiler, it is recommended to use named variables to reduce the amount of # scratch space that needs to be allocated. + @bpf @struct class data_t: @@ -48,8 +49,12 @@ def hello_world(ctx: c_void_p) -> c_int64: a = last.lookup(0) print(f"a is {a}") last.update(9, 9) - last.update(0, last.lookup(last.lookup(0)) + - last.lookup(last.lookup(0)) + last.lookup(last.lookup(0))) + last.update( + 0, + last.lookup(last.lookup(0)) + + last.lookup(last.lookup(0)) + + last.lookup(last.lookup(0)), + ) z = last.lookup(0) print(f"new map val at index 0 is {z}") else: