Skip to content

Commit a03d3e5

Browse files
format chore
1 parent e1f9ac6 commit a03d3e5

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

pythonbpf/vmlinux_parser/class_handler.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ def process_vmlinux_post_ast(
112112
type_length = elem_type._length_
113113

114114
if containing_type.__module__ == "vmlinux":
115-
new_dep_node.add_dependent(elem_type._type_.__name__ if hasattr(elem_type._type_, "__name__") else str(elem_type._type_))
115+
new_dep_node.add_dependent(
116+
elem_type._type_.__name__
117+
if hasattr(elem_type._type_, "__name__")
118+
else str(elem_type._type_)
119+
)
116120
elif containing_type.__module__ == ctypes.__name__:
117121
if isinstance(elem_type, type):
118122
if issubclass(elem_type, ctypes.Array):
@@ -149,7 +153,11 @@ def process_vmlinux_post_ast(
149153
"Module not supported in recursive resolution"
150154
)
151155
else:
152-
new_dep_node.add_dependent(elem_type.__name__ if hasattr(elem_type, "__name__") else str(elem_type))
156+
new_dep_node.add_dependent(
157+
elem_type.__name__
158+
if hasattr(elem_type, "__name__")
159+
else str(elem_type)
160+
)
153161
process_vmlinux_post_ast(
154162
elem_type, llvm_handler, handler, processing_stack
155163
)

tests/failing_tests/xdp_pass.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
from pythonbpf.maps import HashMap
33
from pythonbpf.helper import XDP_PASS
44
from vmlinux import struct_xdp_md
5-
from vmlinux import struct_trace_event_raw_sys_enter # noqa: F401
6-
from vmlinux import struct_ring_buffer_per_cpu # noqa: F401
5+
from vmlinux import struct_trace_event_raw_sys_enter # noqa: F401
6+
from vmlinux import struct_ring_buffer_per_cpu # noqa: F401
77

88
from ctypes import c_int64
99

0 commit comments

Comments
 (0)