mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
remove some ruff errors
This commit is contained in:
@ -35,13 +35,13 @@ repos:
|
|||||||
- id: requirements-txt-fixer
|
- id: requirements-txt-fixer
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
|
|
||||||
#- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
# rev: "v0.4.2"
|
rev: "v0.4.2"
|
||||||
# hooks:
|
hooks:
|
||||||
# - id: ruff
|
- id: ruff
|
||||||
# args: ["--fix", "--show-fixes"]
|
args: ["--fix", "--show-fixes"]
|
||||||
# - id: ruff-format
|
- id: ruff-format
|
||||||
# exclude: ^(docs)
|
exclude: ^(docs)
|
||||||
|
|
||||||
## Checking static types
|
## Checking static types
|
||||||
#- repo: https://github.com/pre-commit/mirrors-mypy
|
#- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
|
|||||||
@ -674,7 +674,7 @@ def assign_string_to_array(builder, target_array_ptr, source_string_ptr, array_l
|
|||||||
Copy a string (i8*) to a fixed-size array ([N x i8]*)
|
Copy a string (i8*) to a fixed-size array ([N x i8]*)
|
||||||
"""
|
"""
|
||||||
# Create a loop to copy characters one by one
|
# Create a loop to copy characters one by one
|
||||||
entry_block = builder.block
|
# entry_block = builder.block
|
||||||
copy_block = builder.append_basic_block("copy_char")
|
copy_block = builder.append_basic_block("copy_char")
|
||||||
end_block = builder.append_basic_block("copy_end")
|
end_block = builder.append_basic_block("copy_end")
|
||||||
|
|
||||||
|
|||||||
@ -1,2 +1,4 @@
|
|||||||
from .maps import HashMap, PerfEventArray
|
from .maps import HashMap, PerfEventArray
|
||||||
from .maps_pass import maps_proc
|
from .maps_pass import maps_proc
|
||||||
|
|
||||||
|
__all__ = ["HashMap", "PerfEventArray", "maps_proc"]
|
||||||
|
|||||||
@ -1 +1,3 @@
|
|||||||
from .structs_pass import structs_proc
|
from .structs_pass import structs_proc
|
||||||
|
|
||||||
|
__all__ = ["structs_proc"]
|
||||||
|
|||||||
@ -6,6 +6,7 @@ from ctypes import c_void_p, c_int64
|
|||||||
@section("sometag1")
|
@section("sometag1")
|
||||||
def sometag(ctx: c_void_p) -> c_int64:
|
def sometag(ctx: c_void_p) -> c_int64:
|
||||||
a = 1 + 2 + 1
|
a = 1 + 2 + 1
|
||||||
|
print(f"{a}")
|
||||||
return c_int64(0)
|
return c_int64(0)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ from ctypes import c_void_p, c_int64
|
|||||||
@section("sometag1")
|
@section("sometag1")
|
||||||
def sometag(ctx: c_void_p) -> c_int64:
|
def sometag(ctx: c_void_p) -> c_int64:
|
||||||
a = 1 + 2
|
a = 1 + 2
|
||||||
|
print(f"{a}")
|
||||||
return c_int64(0)
|
return c_int64(0)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user