From f135cdbcc0c7653cf47e6c770215881fd27ed315 Mon Sep 17 00:00:00 2001 From: varun-r-mallya Date: Thu, 27 Nov 2025 14:03:12 +0530 Subject: [PATCH] format chore --- pythonbpf/vmlinux_parser/vmlinux_exports_handler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pythonbpf/vmlinux_parser/vmlinux_exports_handler.py b/pythonbpf/vmlinux_parser/vmlinux_exports_handler.py index bba0cd3..3ab07cb 100644 --- a/pythonbpf/vmlinux_parser/vmlinux_exports_handler.py +++ b/pythonbpf/vmlinux_parser/vmlinux_exports_handler.py @@ -145,7 +145,7 @@ class VmlinuxHandler: field_data, struct_name=None, local_sym_tab=None, - tmp_name: str = None, + tmp_name: str | None = None, ): """ Generate LLVM IR to load a field from a regular (non-context) struct using bpf_probe_read_kernel. @@ -231,9 +231,7 @@ class VmlinuxHandler: # Fallback: allocate inline (not ideal, but preserves behavior) local_storage = builder.alloca(ir.IntType(int_width)) local_storage_i8_ptr = builder.bitcast(local_storage, i8_ptr_type) - logger.warning( - f"Temp storage '{tmp_name}' not found. Allocating inline" - ) + logger.warning(f"Temp storage '{tmp_name}' not found. Allocating inline") # Use bpf_probe_read_kernel to safely read the field # This generates: @@ -247,7 +245,9 @@ class VmlinuxHandler: ) # Load the value from local storage - value = builder.load(builder.bitcast(local_storage_i8_ptr, ir.PointerType(ir.IntType(int_width)))) + value = builder.load( + builder.bitcast(local_storage_i8_ptr, ir.PointerType(ir.IntType(int_width))) + ) # Zero-extend i32 to i64 if needed if needs_zext: