Skip to content

Commit b095828

Browse files
remove some ruff errors
1 parent 8d50679 commit b095828

6 files changed

Lines changed: 14 additions & 8 deletions

File tree

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ repos:
3535
- id: requirements-txt-fixer
3636
- id: trailing-whitespace
3737

38-
#- repo: https://github.com/astral-sh/ruff-pre-commit
39-
# rev: "v0.4.2"
40-
# hooks:
41-
# - id: ruff
42-
# args: ["--fix", "--show-fixes"]
43-
# - id: ruff-format
44-
# exclude: ^(docs)
38+
- repo: https://github.com/astral-sh/ruff-pre-commit
39+
rev: "v0.4.2"
40+
hooks:
41+
- id: ruff
42+
args: ["--fix", "--show-fixes"]
43+
- id: ruff-format
44+
exclude: ^(docs)
4545

4646
## Checking static types
4747
#- repo: https://github.com/pre-commit/mirrors-mypy

pythonbpf/functions_pass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ def assign_string_to_array(builder, target_array_ptr, source_string_ptr, array_l
674674
Copy a string (i8*) to a fixed-size array ([N x i8]*)
675675
"""
676676
# Create a loop to copy characters one by one
677-
entry_block = builder.block
677+
# entry_block = builder.block
678678
copy_block = builder.append_basic_block("copy_char")
679679
end_block = builder.append_basic_block("copy_end")
680680

pythonbpf/maps/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
from .maps import HashMap, PerfEventArray
22
from .maps_pass import maps_proc
3+
4+
__all__ = ["HashMap", "PerfEventArray", "maps_proc"]

pythonbpf/structs/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
from .structs_pass import structs_proc
2+
3+
__all__ = ["structs_proc"]

tests/failing_tests/binops.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
@section("sometag1")
77
def sometag(ctx: c_void_p) -> c_int64:
88
a = 1 + 2 + 1
9+
print(f"{a}")
910
return c_int64(0)
1011

1112

tests/failing_tests/license.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
@section("sometag1")
88
def sometag(ctx: c_void_p) -> c_int64:
99
a = 1 + 2
10+
print(f"{a}")
1011
return c_int64(0)
1112

1213

0 commit comments

Comments
 (0)